This is the mail archive of the gcc-patches@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: [patch] alias.c: Replace "return NULL_RTX" with "return 0".


On Thu, Jun 12, 2003 at 02:05:26PM -0700, Zack Weinberg wrote:
> Jason Merrill <jason@redhat.com> writes:
> 
> >> I won't argue readability (though I disagree) but NULL is *NOT* more
> >> reliable in the presence of varargs; there is no guarantee that NULL
> >> doesn't expand to "0".  In the presence of varargs one has no choice
> >> but to write an explicit cast.
> >
> > A system that defines NULL to 0 where that is a different size from
> > (void*)0 is broken.  Does such brokenness actually exist?
> 
> Dunno, but that's still not good enough - consider an ABI where
> pointers go in different registers from integers when passing
> arguments.

Such platform would certainly define NULL to (void *) 0, otherwise it wouldn't
be able to compile *LOTS* of software which assumes passing NULLs through
varargs does the right thing.

	Jakub


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