This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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 :(.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]