This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Warning for unadorned 0 in varargs lists?


>>>>> "Falk" == Falk Hueffner <hueffner@informatik.uni-tuebingen.de> writes:

 Falk> My concern was about differentiating between 0 and NULL. If you
 Falk> care about what works in practise, you should warn about
 Falk> neither; if you care about pedantic standard compliance, you
 Falk> should warn for both.

How can you differentiate 0 from NULL given that NULL is usually
defined as 0?

Yes, there are some people who write (void *)0, but that's generally
considered unnecessary clutter.

The real problem is that C/C++ have a design bug, which is that there
isn't a null pointer token in the language.  Pascal and Algol-68 both
have nil, but that's one item that C++ forgot to copy.

     paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]