This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21402] wrong-code with inlining and type-punned pointer
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2005 21:42:20 -0000
- Subject: [Bug rtl-optimization/21402] wrong-code with inlining and type-punned pointer
- References: <20050505153523.21402.gcc@arbruijn.dds.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-05-21 21:42 -------
Subject: Re: wrong-code with inlining and type-punned pointer
"schlie at comcast dot net" <gcc-bugzilla@gcc.gnu.org> writes:
| (In reply to comment #4)
| > Subject: Re: wrong-code with inlining and type-punned pointer
| > Because this is what the standard says is allowed. The standard also
| > says the comparisons and assignment between pointers without a case is
| > invalid code and should be diagnostic. Again this is what the standard
| > says for these things and GCC follows the C standard.
|
| Here's an interesting portion of the standard, which seems to direcly imply
| that signed and unsigned lvalue references are presumed to validly alias; so
| so this should place both in the same alias set, and potentially eliminate the
| default warning when comparing pointers which differ only in signness, as
Sorry, I don't see that implication. However, GCC already has a
switch for tuning off such comparison.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21402