[LLVMbugs] [Bug 17110] New: incorrect warning "missing exception specification 'throw()'"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Sep 5 12:07:48 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17110
Bug ID: 17110
Summary: incorrect warning "missing exception specification
'throw()'"
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: clang at martinien.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Hi,
for this program:
void __attribute__ ((__noreturn__)) f();
void __attribute__ ((__noreturn__)) exit(int status) throw();
void exit(int status) throw()
{
f();
}
I get the following warning:
clang++ -c warn.cpp
warn.cpp:5:6: warning: 'exit' is missing exception specification 'throw()'
void exit(int status) throw()
^
throw()
warn.cpp:3:37: note: previous declaration is here
void __attribute__ ((__noreturn__)) exit(int status) throw();
^
1 warning generated.
Adding __attribute__ ((__noreturn__)) to the definition of exit() gets rid of
the warning. But is this required at all? Either way, it should not warn about
the throw().
Bug 8829 looks very similar.
Best regards,
Martin
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130905/685d0e90/attachment.html>
More information about the llvm-bugs
mailing list