using literal zero for NULL

I just tried rebuilding my GTK apps for a 64 bit Linux system (Fedora core
5), and had an ugly surprise: random segmentation faults. I traced at least
one of them to my lazy habit of using a literal zero in place of NULL for an
optional function argument or end-of-arg-list indicator. I speculate that
the compiler is supplying a 32 bit zero where a 64 bit zero is needed.
Correct? If so, it seems this is a compiler bug, since the type conversion
should be automatic. Can someone confirm this?

View this message in context:
Sent from the Gtk+ - Dev - General forum at

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]