This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11474] -Wreturn-type should default to on when compiling C++


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From gdr at integrable-solutions dot net  2003-07-13 07:41 -------
Subject: Re:  -Wreturn-type should default to on when compiling C++

"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| No. 6.6.3/2 says
|   [...] 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.
| 
| It specifically does not say that a diagnostic is required.

a diagnostic is required only  for diagnosable rules, and
"undefined behaviour" is not one.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]