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?


"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


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