This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C/C++ FEs: Do we really need three char_type_nodes?
On Mon, Sep 22, 2008 at 8:48 AM, Mark Mitchell <mark@codesourcery.com> wrote:
> Richard Guenther wrote:
>
>> char and signed char (if char is signed) are the same types for the
>> middle-end (but not for the Frontend).
>
> Is that desirable? Type-based alias analysis should be able to take
> advantage of the difference between them; a "char **" and a "signed char
> **" cannot point at the same thing, for example.
>
Should, but currently can't.
They will both have alias set 0, last time I checked (about 2 months ago).
I imagine if we started actually enforcing strict aliasing between
signed char * and char * we'd break even more code and have even more
complaints.
It's also going to be rare that this is a useful aliasing relationship
to disambiguate between.