This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53707] compiler generates wrong code
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jul 2012 05:02:18 +0000
- Subject: [Bug c++/53707] compiler generates wrong code
- Auto-submitted: auto-generated
- References: <bug-53707-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-03 05:02:18 UTC ---
The http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53707#c11 testcase is invalid.
In C (or C++) you can compare only pointers into the same object (or one past
the last byte of the object).
You need to cast the pointers to uintptr_t and do the comparisons in that type.