[Bug c++/54740] Empty base optimization gets confused when a member variable derives from the same empty base.

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Sep 29 00:01:00 GMT 2012


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-09-29 00:01:31 UTC ---
(In reply to comment #1)
> No they shouldn't. The standard requires this to pass:
> 
>   outer o;
>   assert( static_cast<inner*>(&o) != &o.i_ );

Oops, that should be:

   assert( static_cast<empty_base*>(&o) != &o.i_ );



More information about the Gcc-bugs mailing list