PR c++/87603 - constexpr functions are no longer noexcept.
authorMarek Polacek <polacek@redhat.com>
Fri, 12 Apr 2019 15:29:03 +0000 (15:29 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 12 Apr 2019 15:29:03 +0000 (15:29 +0000)
commitc46f1a1791b3ec3a58780a4b882ecf19f047869a
tree5ebfaf92e50457cb04fa46ccb246df340415737b
parentcc3bae3dc2819726e3d3903937e65f4f8d4f2fd5
PR c++/87603 - constexpr functions are no longer noexcept.

* constexpr.c (is_sub_constant_expr): Remove unused function.
* cp-tree.h (is_sub_constant_expr): Remove declaration.
* except.c (check_noexcept_r): Don't consider a call to a constexpr
function noexcept.

* g++.dg/cpp0x/constexpr-noexcept.C: Adjust the expected result.
* g++.dg/cpp0x/constexpr-noexcept3.C: Likewise.
* g++.dg/cpp0x/constexpr-noexcept4.C: Likewise.
* g++.dg/cpp0x/constexpr-noexcept8.C: New test.
* g++.dg/cpp0x/inh-ctor32.C: Remove dg-message.
* g++.dg/cpp1y/constexpr-noexcept1.C: New test.

From-SVN: r270320
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/except.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C
gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C
gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C
gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/inh-ctor32.C
gcc/testsuite/g++.dg/cpp1y/constexpr-noexcept1.C [new file with mode: 0644]