Warning for unadorned 0 in varargs lists?
Falk Hueffner
hueffner@informatik.uni-tuebingen.de
Mon Aug 23 16:24:00 GMT 2004
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
> > My concern was about differentiating between 0 and NULL. If you care
> > about what works in practise, you should warn about neither; if you
> > care about pedantic standard compliance, you should warn for both.
> > Falk
>
> I used to feel as you do, that since 0 works in practice we should
> silently accept it. But it costs the user nothing to switch to NULL
> in their code and may in fact fix a bug where some 64-bit ABI
> doesn't do padding for unadorned 0.
Hmm. Switching from one noncompliant code variant to another
noncompliant code variant to fix problems with nonexistant real
systems doesn't seem particularly sensible to me... If you touch the
code, you might as well use the guaranteed correct method.
--
Falk
More information about the Gcc
mailing list