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; }