[LLVMbugs] [Bug 16638] New: -Wimplicit-exception-spec-mismatch fires on implicitly generated operator delete

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 16 15:13:04 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16638

            Bug ID: 16638
           Summary: -Wimplicit-exception-spec-mismatch fires on implicitly
                    generated operator delete
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This shouldn't warn:

$ cat test.cc
class ScriptData {
 public:
  virtual ~ScriptData() { }
  virtual bool HasError() = 0;
};

void operator delete[](void* ptr) throw();
void operator delete(void* ptr) throw();


But it does:

$ third_party/llvm-build/Release+Asserts/bin/clang -c test.cc -std=gnu++11
-Wall 
test.cc:7:6: warning: function previously declared with an implicit exception
specification redeclared with an explicit exception specification
[-Wimplicit-exception-spec-mismatch]
void operator delete[](void* ptr) throw();
     ^
test.cc:8:6: warning: function previously declared with an implicit exception
specification redeclared with an explicit exception specification
[-Wimplicit-exception-spec-mismatch]
void operator delete(void* ptr) throw();
     ^
2 warnings generated.

$ third_party/llvm-build/Release+Asserts/bin/clang --version
clang version 3.4 (trunk 184830)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

-- 
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/20130716/1a339c91/attachment.html>


More information about the llvm-bugs mailing list