https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110437

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>reproduce.cpp:10:1: warning: no return statement in function returning 
>non-void [-Wreturn-type]


Yes it is undefined code (at runtime) if the code falls through from a function
which has a non-void return type for C++. The rules for C is slightly
different, it is only undefined if the return value from the function is tried
to be used.

Reply via email to