[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
In the absence of both the prototype and a cast, NULL (which can be 0) will be
passed as an int, not as a pointer. These need not be the same size, leading
to a situation where the termination of the list will not be guaranteed if
there's stack garbage that is non-zero in the other half of the pointer.
The whole issue of defining NULL to be 0 or (void *)0 can be debated. Each
definition catches some class of bugs, while letting other classes of bugs
through. Both definitions are 100% standards compliant for C.
Given that NetBSD's charter is to create portable code, reverting the variadic
function argument cast removal seems the most portable thing to do.
On Aug 31, 2011, at 7:03 PM, David Young wrote:
> On Thu, Sep 01, 2011 at 03:47:29AM +0400, Valeriy E. Ushakov wrote:
>> On Thu, Sep 01, 2011 at 01:24:12 +0200, Joerg Sonnenberger wrote:
>>> Please revert this. It is incorrect at least for execl and other
>>> variadic functions.
>> What Joerg said. I know, Xenix 286 is, fortunately, no longer with
>> us, but I learned its lessons the hard way :)
> Joerg, Valeriy,
> Please explain your objection.
> David Young OJC Technologies
> dyoung%ojctech.com@localhost Urbana, IL * (217) 344-0444 x24
Main Index |
Thread Index |