public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Ramsay Jones <ramsay@ramsay1•demon.co.uk>
Cc: Jeff King <peff@peff•net>, GIT Mailing-list <git@vger•kernel.org>
Subject: Re: [RFC/PATCH] Add the NO_SENTINEL build variable
Date: Wed, 17 Jul 2013 09:06:58 -0700	[thread overview]
Message-ID: <7v38rd8925.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <51E4338E.4090003@ramsay1.demon.co.uk> (Ramsay Jones's message of "Mon, 15 Jul 2013 18:38:22 +0100")

Ramsay Jones <ramsay@ramsay1•demon.co.uk> writes:

> diff --git a/git-compat-util.h b/git-compat-util.h
> index 9f1eaca..e846e01 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -300,6 +300,12 @@ extern char *gitbasename(char *);
>  #endif
>  #endif
>  
> +#if defined(__GNUC__) && !defined(NO_SENTINEL)
> +#define SENTINEL(n) __attribute__((sentinel(n)))
> +#else
> +#define SENTINEL(n)
> +#endif

Allowing callers to use __attribute__((sentinel(1)), while it may be
a good enhancement, does not belong to "some versions of GCC do not
know what to do with the sentinel attribute".  Making this change in
a separate patch on top would be cleaner.

Also do we know what version of GCC started supporting this
attribute?  http://gcc.gnu.org/gcc-4.0/changes.html mentions it in
"New Languages and Language specific improvements" section, but the
page also says "The latest release in the 4.0 release series is GCC
4.0.4", so it is not clear if 4.0 had it, or it was added somewhere
between 4.0 and 4.0.4 to me.

  parent reply	other threads:[~2013-07-17 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 17:38 [RFC/PATCH] Add the NO_SENTINEL build variable Ramsay Jones
2013-07-15 18:13 ` Jonathan Nieder
2013-07-18 17:27   ` Ramsay Jones
2013-07-18 21:25     ` Junio C Hamano
2013-07-20 17:51       ` Ramsay Jones
2013-07-17 16:06 ` Junio C Hamano [this message]
2013-07-17 16:55   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v38rd8925.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=peff@peff$(echo .)net \
    --cc=ramsay@ramsay1$(echo .)demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox