This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM constant folding bug?
> > Shouldn't it also work by changing the (char *) cast to (unsigned char
> > *), since IIUIC the standard guarantees you're allowed to access any
> > object as an array of unsigned char and not get into aliasing
> > difficulties?
>
> The standard makes the same guarantee about (char *). This is not
> "exploiting a hole"; it is standard C that you can access anything
> as (char *).
IMHO Being a standardised feature doesn't make it any less of a loophole :-)
Paul