This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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