[PATCH] Fix execl sentinels
wharms at bfs.de
Mon Jul 1 17:42:39 UTC 2013
The C-Reference Manual has a topic called
"Null Pointers and Invalid Pointers"
for anyone that like to go the source.
i like this one:
"It is usual for alll null pointers to have a representation in which all bits are zero,
but this is not required."
Am 01.07.2013 19:27, schrieb Rich Felker:
> On Mon, Jul 01, 2013 at 12:36:32PM -0400, Cathey, Jim wrote:
>> Seems to me the C++ definition of NULL as "0" is what is garbage.
>> It's been a zero void * for ages, why change it, then complain that
>> it isn't big enough for a pointer on selected architectures?
> Please, let's not bikeshed this. Unfortunately the definition of NULL
> is a huge bikeshed topic, because everybody _THINKS_ it's something
> easy they know the answer to, but unfortunately it's not.
> NULL cannot be defined as ((void *)0) in C++ because C++ does not have
> implicit conversions from void * to other pointer types. The
> historical solution was to define it to 0. Defining it instead as a
> zero whose type matches the size of pointer types is better. Defining
> it to __null or similar is tempting but non-conforming to the standard.
>> the whole reason it changed to a pointer from a simple zero thirty-odd
>> years ago.
> I must have missed that...
> busybox mailing list
> busybox at busybox.net
More information about the busybox