From: Jason Merrill Date: Mon, 27 Jan 2020 02:34:33 +0000 (-0500) Subject: c++: Testsuite adjustments for PR 90992. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40bf3f1fd058028988b2625f89efe6bb811a4185;p=gcc.git 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. --- diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept03.C b/gcc/testsuite/g++.dg/cpp0x/noexcept03.C index 906a44da457..b25e7327947 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 d26a3aeab10..bda7269d927 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 -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 e3a5df64459..93210dead04 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 f59733e705f..8843ab4237b 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 void construct1(_Up* __p, _Args... __args) @@ -33,5 +22,4 @@ public: private: size_t Bla; - NotNoexcept Dummy; };