[Bug c++/57557] can't reference static const int member with optimizations on

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 7 15:01:00 GMT 2013


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's undefined behaviour, you take a reference ton object that has no
definition (i.e. no address)

Please read
http://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition



More information about the Gcc-bugs mailing list