Re: [patch 1/3] Make obconcat use stdarg

Mark Kettenis
2010-04-30T19:09:13Z

> Date: Fri, 30 Apr 2010 20:16:05 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Hi,
>
> __attribute__ ((sentinel)) availability for gcc >= 4.0 I have copied from
> <glib-2.0/glib/gmacros.h>. It roughly matches the GCC ChangeLog dates.

The OpenBSD system compile, which is based on GCC 3.3.5, already has
the sentinel attribute.

> No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu for the whole
> patchset.

I'm afraid you'll need an explicit cast for the NULLs used as the
sentinel value, otherwise platforms that

#define NULL 0L

will generate warnings like:

sentinel.c: In function 'foo':
sentinel.c:8: warning: missing sentinel in function call

and with -Werror, that's not a good :(.