This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: aliasing warnings [patch]
- To: Joe Buck <jbuck at synopsys dot COM>
- Subject: Re: aliasing warnings [patch]
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 25 Sep 1999 13:02:11 -0600
- cc: mark at codesourcery dot com (Mark Mitchell), zack at bitmover dot com, egcs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199909240006.RAA28376@atrus.synopsys.com>you write:
> Someone mentioned that DEC's compiler issues warnings of this type
> and that's how the Perl team became aware of the issue. The above
> approach seems like a clean way to get such warnings, for the case
> where all the code is in the same function.
>
> The RMS variant (sure to be contoversial) would be to put a pointer with
> this tag into alias set 0 (it can alias everything).
I haven't thought a lot about the implications of this, but at first glance
it's not a bad idea.
It should achieve RMS's goal of having old broken code still work without a
severe impact on most conforming code.
It's behavior should be consistent over time and we should be able to
document the behavior.
I don't know how difficult this is from a technical standpoint, but it is
probably worth some investigation.
jef