This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25267] [3.4 4.0 regression] wrong code with inlining at -O2
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2005 15:23:20 -0000
- Subject: [Bug c++/25267] [3.4 4.0 regression] wrong code with inlining at -O2
- References: <bug-25267-11182@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-12-05 15:23 -------
You are violating C/C++ aliasing rules:
inline float hton(float x)
....
uint32_t* p32 = (uint32_t*)(&x);
You are accessing a float through a uint32_t.
*** This bug has been marked as a duplicate of 21920 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25267