diff options
author | Jason Merrill <jason@redhat.com> | 2020-01-26 21:34:33 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-01-26 21:37:01 -0500 |
commit | 40bf3f1fd058028988b2625f89efe6bb811a4185 (patch) | |
tree | c948f9a57a65b2cec52042a4ca1129257c694906 | |
parent | 5035cd662459b09605370f2ba41b2238119c69b1 (diff) | |
download | gcc-40bf3f1fd058028988b2625f89efe6bb811a4185.zip gcc-40bf3f1fd058028988b2625f89efe6bb811a4185.tar.gz gcc-40bf3f1fd058028988b2625f89efe6bb811a4185.tar.bz2 |
c++: Testsuite adjustments for PR 90992.
It occurred to me that the NotNoexcept class is irrelevant to the issue I
was fixing, so let's remove it.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/noexcept03.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/noexcept09.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wnoexcept1.C | 3 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wnoexcept1.h | 12 |
4 files changed, 3 insertions, 16 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept03.C b/gcc/testsuite/g++.dg/cpp0x/noexcept03.C index 906a44d..b25e732 100644 --- a/gcc/testsuite/g++.dg/cpp0x/noexcept03.C +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept03.C @@ -35,7 +35,7 @@ void f2(T a) noexcept (noexcept (f (a))) f(a); } -struct A { A() { } }; // { dg-warning "does not throw" } +struct A { A() { } }; // { dg-message "does not throw" } int main() { diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept09.C b/gcc/testsuite/g++.dg/cpp0x/noexcept09.C index d26a3ae..bda7269 100644 --- a/gcc/testsuite/g++.dg/cpp0x/noexcept09.C +++ b/gcc/testsuite/g++.dg/cpp0x/noexcept09.C @@ -3,7 +3,7 @@ // { dg-options "-Wnoexcept" } template <class T> -T f (T t) { return t; } // { dg-warning "does not throw" } +T f (T t) { return t; } // { dg-message "does not throw" } #define SA(X) static_assert(X, #X) diff --git a/gcc/testsuite/g++.dg/warn/Wnoexcept1.C b/gcc/testsuite/g++.dg/warn/Wnoexcept1.C index e3a5df6..93210de 100644 --- a/gcc/testsuite/g++.dg/warn/Wnoexcept1.C +++ b/gcc/testsuite/g++.dg/warn/Wnoexcept1.C @@ -7,7 +7,7 @@ // We expect a warning at the declaration of construct2, since Automatic2 is // defined below; we don't expect one for construct1, because Automatic1 is // defined in the fake system header. -// { dg-warning "noexcept-expression" "" { target *-*-* } 26 } +// { dg-warning "noexcept-expression" "" { target *-*-* } 15 } class Automatic2 { public: @@ -15,7 +15,6 @@ public: private: size_t Bla; - NotNoexcept Dummy; }; union U diff --git a/gcc/testsuite/g++.dg/warn/Wnoexcept1.h b/gcc/testsuite/g++.dg/warn/Wnoexcept1.h index f59733e..8843ab4 100644 --- a/gcc/testsuite/g++.dg/warn/Wnoexcept1.h +++ b/gcc/testsuite/g++.dg/warn/Wnoexcept1.h @@ -4,17 +4,6 @@ using size_t = decltype(sizeof(42)); inline void * operator new (size_t, void *p) noexcept { return p; } -class NotNoexcept { -public: - NotNoexcept() noexcept(false) {} - NotNoexcept(const NotNoexcept&) noexcept(false) {} - NotNoexcept(NotNoexcept &&) noexcept(false) {} - ~NotNoexcept() noexcept(false) {} - - NotNoexcept&operator=(const NotNoexcept&) noexcept(false) { return *this;} - NotNoexcept&operator=(NotNoexcept &&) noexcept(false) {return *this;} -}; - template<typename _Up, typename... _Args> void construct1(_Up* __p, _Args... __args) @@ -33,5 +22,4 @@ public: private: size_t Bla; - NotNoexcept Dummy; }; |