This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27577] Change "control reaches end of non-void function" to an error, when a complex type gets returned
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2006 21:19:43 -0000
- Subject: [Bug c++/27577] Change "control reaches end of non-void function" to an error, when a complex type gets returned
- References: <bug-27577-12681@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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