https://bugs.llvm.org/show_bug.cgi?id=32158
Bug ID: 32158
Summary: Program crashing due to missing return statement?
Product: new-bugs
Version: 3.9
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: yaron.ke...@gmail.com
CC: llvm-bugs@lists.llvm.org
$ cat file1.cpp
int backend() {}
int main() { backend(); }
$ clang-3.9 file1.cpp ; ./a.out
file1.cpp:1:16: warning: control reaches end of non-void function
[-Wreturn-type]
int backend() {}
^
1 warning generated.
Illegal instruction (core dumped)
$ clang-3.9 -v
clang version 3.9.0 (trunk 274529)
happens with clang version 5.0.0 (trunk 294982) too.
if this is valid (undefined?) behaviour, shouldn't the -Wreturn-type be an
error?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs