summaryrefslogtreecommitdiff
path: root/gcc/cp/typeck2.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 12:10:17 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-01 12:10:17 +0000
commit4c3bd1e3cabbca5928c1d091e7ce1d77d6d5c63c (patch)
treec3fa1d2d7c3ec986ecf88309c6206c316b44041a /gcc/cp/typeck2.c
parent313d569f6593e16320460aa2894320d12fbcfe2c (diff)
downloadgcc-4c3bd1e3cabbca5928c1d091e7ce1d77d6d5c63c.tar.gz
PR c++/68475
* decl.c (check_redeclaration_exception_specification): Check regardless of -fno-exceptions. * typeck2.c (merge_exception_specifiers): Relax assert by checking flag_exceptions too. * g++.dg/g++.dg/cpp0x/noexcept29.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234667 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/typeck2.c')
-rw-r--r--gcc/cp/typeck2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 4ab77cda387..b921689808a 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -2143,7 +2143,7 @@ merge_exception_specifiers (tree list, tree add)
return add;
noex = TREE_PURPOSE (list);
gcc_checking_assert (!TREE_PURPOSE (add)
- || errorcount
+ || errorcount || !flag_exceptions
|| cp_tree_equal (noex, TREE_PURPOSE (add)));
/* Combine the dynamic-exception-specifiers, if any. */