Ok. Thanks for pointing that out. J'
On Tue, Sep 21, 2010 at 10:11:04PM -0700, Ben Pfaff wrote:
The recent commit c75794cff "Const casts" removes some casts of
NULL to a pointer type within varargs parameter lists. This will
cause problems on 64-bit systems that #define NULL to 0 (without
any cast to pointer type). This is a special case where the cast
cannot be removed. (If you want to introduce a macro for this
case, to make it obvious what's going on, that's fine with me.)
The GNU coding standards even has a specific exception for this:
Zero without a cast is perfectly fine as a null
pointer constant, except when calling a varargs function.
(For what it's worth, I prefer NULL over 0 as a null pointer
constant. It makes it obvious that it's a pointer instead of an
integer.)
--
Ben Pfaff
http://benpfaff.org
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature
_______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
