[Bug c++/70558] POD datatype array crash in initialization when using optimization
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 6 08:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70558
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
inline Double &operator =(const double &other) { x = other; }
you fail to return *this:
> g++-5 test.cpp -O -std=c++11 -Wall
In file included from test.cpp:3:0:
Double.h: In member function ‘Double& Double::operator=(const double&)’:
Double.h:24:63: warning: no return statement in function returning non-void
[-Wreturn-type]
inline Double &operator =(const double &other) { x = other; }
More information about the Gcc-bugs
mailing list