[Bug c++/33425] GCC Compiles C++ program containing value-returning functions that don't return a value

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Sep 13 23:51:00 GMT 2007



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-09-13 23:51 -------
That book is wrong when it comes to the standard.
The standard says (6.6.2/2, last sentence):
Flowing off the end of a function is equivalent to a return with no value; this
results in ___undefined behavior___ in a value returning function.


-- 

pinskia at gcc dot gnu dot org changed:

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


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



More information about the Gcc-bugs mailing list