Re: [RFC/PATCH] Add the NO_SENTINEL build variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]