Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-21 Thread Ramsay Jones
Junio C Hamano wrote: Ramsay Jones ram...@ramsay1.demon.co.uk writes: The sentinel function attribute is not understood by versions of the gcc compiler prior to v4.0. At present, for earlier versions of gcc, the build issues 108 warnings related to the unknown attribute. In order to

Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-19 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: It seems to apply well on the tip of jk/gcc-function-attributes. - This macro is not about git at all, so I'll edit the patch to call it GCC_ATTR_SENTINEL before applying. Would naming it something like

[PATCH] Add the GIT_SENTINEL macro

2013-07-18 Thread Ramsay Jones
The sentinel function attribute is not understood by versions of the gcc compiler prior to v4.0. At present, for earlier versions of gcc, the build issues 108 warnings related to the unknown attribute. In order to suppress the warnings, we conditionally define the GIT_SENTINEL macro to provide

Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-18 Thread Jeff King
On Thu, Jul 18, 2013 at 09:02:12PM +0100, Ramsay Jones wrote: The sentinel function attribute is not understood by versions of the gcc compiler prior to v4.0. At present, for earlier versions of gcc, the build issues 108 warnings related to the unknown attribute. In order to suppress the

Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-18 Thread Jonathan Nieder
Ramsay Jones wrote: This was built on the next branch All the uses of the sentinel attribute seem to come from eccb6149 (use sentinel function attribute for variadic lists, 2013-07-09), so this should be okay to go on top of the jk/gcc-function-attributes branch. --- a/git-compat-util.h +++

Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-18 Thread Junio C Hamano
Ramsay Jones ram...@ramsay1.demon.co.uk writes: The sentinel function attribute is not understood by versions of the gcc compiler prior to v4.0. At present, for earlier versions of gcc, the build issues 108 warnings related to the unknown attribute. In order to suppress the warnings, we

Re: [PATCH] Add the GIT_SENTINEL macro

2013-07-18 Thread Jonathan Nieder
Junio C Hamano wrote: It seems to apply well on the tip of jk/gcc-function-attributes. - This macro is not about git at all, so I'll edit the patch to call it GCC_ATTR_SENTINEL before applying. Would naming it something like LAST_ARG_MUST_BE_NULL instead make sense? That way, if some