[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args.
From: |
Jan Hudec |
Subject: |
Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args. |
Date: |
Wed, 17 Mar 2004 10:49:49 +0100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Tue, Mar 16, 2004 at 09:26:29 -0500, Stefan Monnier wrote:
> > It happens with some debugging systems (which I believe was the
> > original intent), where they use a tagged NULL pointer so that instead
> > of "Dereferenced NULL <segfault>", you get "Dereferenced NULL from
> > foo.c:63 <segfault>", which can be very useful on occasion.
>
> Wouldn't that tend to cause problems where
>
> assert (NULL
> ==
> NULL);
>
> can fail?
assert (NULL == NULL) can't fail, by definition.
If the compiler uses tagged NULLs, it will implement the comparsion by
a short routine that will check for bit equality and for tagged nulls.
Note, that noone ever guaranteed that:
union {
void *p;
long l;
} a, b;
a.p = NULL; b.p = NULL;
assert(a.l == b.l);
Won't fail, even if sizeof(void *) == sizeof(long).
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec
<address@hidden>
signature.asc
Description: Digital signature
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., (continued)
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Tom Lord, 2004/03/11
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/11
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Andrew Suffield, 2004/03/11
- Re: [Gnu-arch-users] posible issue on ia64 with va_args., Jan Hudec, 2004/03/11
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/12
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Jan Hudec, 2004/03/12
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Miles Bader, 2004/03/12
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args., Andrew Suffield, 2004/03/16
- [Gnu-arch-users] Re: posible issue on ia64 with va_args., Stefan Monnier, 2004/03/16
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args., Andrew Suffield, 2004/03/18
- Re: [Gnu-arch-users] Re: posible issue on ia64 with va_args.,
Jan Hudec <=