This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30252] [4.2 regression] miscompilation of sigc++-2.0 based code with -fstrict-aliasing



------- Comment #13 from giovannibajo at libero dot it  2007-05-01 02:11 -------
(In reply to comment #2)

> 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.

But:
    template <class T_functor>
    struct typed_slot_rep : public slot_rep

so it looks like it might be valid.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30252


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]