This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/3] Make obconcat use stdarg
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 30 Apr 2010 21:08:48 +0200 (CEST)
- Subject: Re: [patch 1/3] Make obconcat use stdarg
- References: <20100430181605.GA19190@host0.dyn.jankratochvil.net>
> 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 :(.