diff options
Diffstat (limited to 'test/CXX/except')
| -rw-r--r-- | test/CXX/except/except.spec/p3.cpp | 4 | ||||
| -rw-r--r-- | test/CXX/except/except.spec/p4.cpp | 2 | ||||
| -rw-r--r-- | test/CXX/except/except.spec/p5-pointers.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/test/CXX/except/except.spec/p3.cpp b/test/CXX/except/except.spec/p3.cpp index d77aea40602c..03f1d7626c0d 100644 --- a/test/CXX/except/except.spec/p3.cpp +++ b/test/CXX/except/except.spec/p3.cpp @@ -24,9 +24,9 @@ extern void (*r4)() throw(...); extern void (*r5)() throw(int); // expected-note {{previous declaration}} extern void (*r5)(); // expected-error {{exception specification in declaration does not match}} -// For functions, we accept this with a warning. +// throw(int) and no spec are not compatible extern void f5() throw(int); // expected-note {{previous declaration}} -extern void f5(); // expected-warning {{missing exception specification}} +extern void f5(); // expected-error {{missing exception specification}} // Different types are not compatible. extern void (*r7)() throw(int); // expected-note {{previous declaration}} diff --git a/test/CXX/except/except.spec/p4.cpp b/test/CXX/except/except.spec/p4.cpp index 8d1b75fbdd6d..04b2bd9bf28b 100644 --- a/test/CXX/except/except.spec/p4.cpp +++ b/test/CXX/except/except.spec/p4.cpp @@ -19,7 +19,7 @@ struct T { void operator delete(void*) noexcept; // expected-note {{here}} }; -void T::a() {} // expected-warning {{missing exception specification 'noexcept'}} +void T::a() {} // expected-error {{missing exception specification 'noexcept'}} T::~T() {} // expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}} void T::operator delete(void*) {} // expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}} diff --git a/test/CXX/except/except.spec/p5-pointers.cpp b/test/CXX/except/except.spec/p5-pointers.cpp index f855520aa24d..fe4a264587f5 100644 --- a/test/CXX/except/except.spec/p5-pointers.cpp +++ b/test/CXX/except/except.spec/p5-pointers.cpp @@ -73,7 +73,7 @@ void fnptrs() // Member function stuff struct Str1 { void f() throw(int); }; // expected-note {{previous declaration}} -void Str1::f() // expected-warning {{missing exception specification}} +void Str1::f() // expected-error {{missing exception specification}} { } |
