aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/cp/except.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/cp/except.c')
-rw-r--r--gcc-4.9/gcc/cp/except.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/cp/except.c b/gcc-4.9/gcc/cp/except.c
index 221971ac9..3a66c678b 100644
--- a/gcc-4.9/gcc/cp/except.c
+++ b/gcc-4.9/gcc/cp/except.c
@@ -1269,6 +1269,8 @@ bool
nothrow_spec_p (const_tree spec)
{
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
+ if (spec == NULL_TREE && flag_default_noexcept)
+ return true;
if (spec == NULL_TREE
|| TREE_VALUE (spec) != NULL_TREE
|| spec == noexcept_false_spec)
@@ -1290,7 +1292,7 @@ type_noexcept_p (const_tree type)
{
tree spec = TYPE_RAISES_EXCEPTIONS (type);
gcc_assert (!DEFERRED_NOEXCEPT_SPEC_P (spec));
- if (flag_nothrow_opt)
+ if (flag_nothrow_opt || flag_default_noexcept)
return nothrow_spec_p (spec);
else
return spec == noexcept_true_spec;