[Bug c++/87515] New: "no return statement in function returning non-void" miscompiles with optimizations

2018-10-04 Thread jaydee at email dot cz
NCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jaydee at email dot cz Target Milestone: --- Happens with gcc version 8.2.0 (Debian 8.2.0-7), standalone near-minimal testcase: #include using namespace

[Bug c++/87515] "no return statement in function returning non-void" miscompiles with optimizations

2018-10-04 Thread jaydee at email dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87515 --- Comment #2 from Jakub Drnec --- Ok, will use -Werror=return-type , thanks. Looking at the discussion in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943 this really is not legal code, I merely wasn't expecting the nasal demons to be this vi