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: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches at sourceware dot org
- Date: Mon, 03 May 2010 12:24:55 -0600
- Subject: Re: [patch 1/3] Make obconcat use stdarg
- References: <20100430181605.GA19190@host0.dyn.jankratochvil.net> <201004301908.o3UJ8mGf006742@glazunov.sibelius.xs4all.nl> <20100502075217.GA29039@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "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