This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30252] [4.2/4.3 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
- 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: 18 Dec 2006 19:04:16 -0000
- Subject: [Bug tree-optimization/30252] [4.2/4.3 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing
- References: <bug-30252-7958@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 2006-12-18 19:04 -------
Hmm,
typedef typed_slot_rep<T_functor> typed_slot;
typed_slot *typed_rep = static_cast<typed_slot*>(rep);
return (typed_rep->functor_)();
This code could violate C++ aliasing rules.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252