[LLVMbugs] [Bug 8829] New: bad interaction bt attribute noreturn and throw specification
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Dec 20 02:59:44 PST 2010
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: unassignedclangbugs at nondot.org
ReportedBy: akim.demaille at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
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.
More information about the llvm-bugs
mailing list