[Bug c++/43943] "warning: no return statement in function returning non-void" should be an error

2023-03-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943 Andrew Pinski changed: What|Removed |Added CC||contact@thunderperfectwitch

[Bug c++/43943] "warning: no return statement in function returning non-void" should be an error

2022-04-19 Thread kdevel at vogtner dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943 Stefan changed: What|Removed |Added CC||kdevel at vogtner dot de --- Comment #8 from

[Bug c++/43943] "warning: no return statement in function returning non-void" should be an error

2020-04-26 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943 Jonathan Wakely changed: What|Removed |Added CC||dcb314 at hotmail dot com --- Comment

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-30 Thread david at rothlis dot net
--- Comment #3 from david at rothlis dot net 2010-04-30 06:05 --- a function with a missing return is valid I just can't reconcile that with the following line from the C++ standard: It is now invalid to return (explicitly or implicitly) from a function which is declared to return a

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-30 Thread redi at gcc dot gnu dot org
--- Comment #4 from redi at gcc dot gnu dot org 2010-04-30 11:22 --- (In reply to comment #3) a function with a missing return is valid I just can't reconcile that with the following line from the C++ standard: It is now invalid to return (explicitly or implicitly) from a function

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-30 Thread redi at gcc dot gnu dot org
--- Comment #5 from redi at gcc dot gnu dot org 2010-04-30 11:26 --- The point being that it's undefined behaviour to /return/ from such a function, not to /write/ such a function. If the programmer guarantees the missing return will never happen then there's no error. I was wrong to

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-30 Thread david at rothlis dot net
--- Comment #6 from david at rothlis dot net 2010-04-30 14:01 --- OK, thanks for the explanation! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-29 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-04-29 20:31 --- -Werror=Wreturn-type will turn just that warning into an error message in recent GCC's. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943

[Bug c++/43943] warning: no return statement in function returning non-void should be an error

2010-04-29 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2010-04-29 20:36 --- that should be -Werror=return-type but spelling aside, this is not a bug now the compiler MUST NOT reject it by default, since a function with a missing return is valid as long as the caller does not use the