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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to