http://llvm.org/bugs/show_bug.cgi?id=8829
Summary: bad interaction bt attribute noreturn and throw
specification
Product: clang
Version: 2.8
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Created an attachment (id=5910)
--> (http://llvm.org/bugs/attachment.cgi?id=5910)
input file
When compiling (-Wall) the following file, there's a weird warning:
$ clang -Wall foo.cc -o foo -c
foo.cc:6:1: warning: 'fail' is missing exception specification 'throw(int)'
fail()
^
throw(int)
foo.cc:2:13: note: previous declaration is here
static void fail() throw (int);
^
foo.cc:6:1: warning: unused function 'fail' [-Wunused-function]
fail()
^
2 warnings generated.
clang is happier if I repeat the noreturn spec on the definition of the
function. GCC does not require that. So I would say there are two issues:
- the warning is very misleading (read "wrong" :)
- maybe it should not even exist, as GCC does not require it.
Thanks for all the good work!
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs