[Bug c++/27577] Change "control reaches end of non-void function" to an error, when a complex type gets returned

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri May 12 21:20:00 GMT 2006



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-05-12 21:19 -------
(In reply to comment #0)
> Yes, I am fully aware, that my snipplet is buggy, however an ignored warning
> should not cause a crash in the program.

Code that invokes undefined behavior at runtime cannot be turned into an error
as it might never be reached.  An example is you never call foo which the code
is valid semantically but is undefined.


-- 

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=27577



More information about the Gcc-bugs mailing list