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


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> On Fri, 30 Apr 2010 21:08:48 +0200, Mark Kettenis wrote:
>> I'm afraid you'll need an explicit cast for the NULLs used as the
>> sentinel value

Jan> There is also needed a fix for cases already protected by
Jan> ATTRIBUTE_SENTINEL and already using just the bare "NULL" sentinel:

Yes.

Jan> Nobody has noticed this problem since 2004.

Lucky, I guess.

Elsewhere gdb uses `(char *) 0':

./ser-pipe.c:      execl ("/bin/sh", "sh", "-c", name, (char *) 0);

I am ok with that, or `(char *) NULL' or even `#define SENTINEL ...'.

I realize this is ugly, but that's C for you.  This problem has really
bitten people in the past, it pays to be pedantically correct here.

Tom


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