aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-04-15 13:38:54 -0400
committerJason Merrill <jason@redhat.com>2021-04-15 14:06:21 -0400
commit2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f (patch)
tree9cf8ffec9561a9afb453780ebfc0ca8e5756f6c9 /gcc/cp/tree.c
parenta25590f29d07a88f6bf1b2c1ab0e4e012725db98 (diff)
downloadgcc-2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f.zip
gcc-2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f.tar.gz
gcc-2efbbba16a0630fac8cadcd6d9e0ffaabfadb79f.tar.bz2
c++: noexcept error recursion [PR100101]
Here instantiating the noexcept-specifier for bar<void>() means instantiating A<void>::value, which complains about the conversion from 0 to int* in the default argument of foo. Since my patch for PR99583, printing the error context involves looking at C<void>::type, which again wants to instantiate A<void>::value, which breaks. For now at least, let's break this recursion by avoiding looking into the noexcept-specifier in find_typenames, and limit that to just the uses_parameter_packs case that PR99583 cares about. gcc/cp/ChangeLog: PR c++/100101 PR c++/99583 * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into TYPE_RAISES_EXCEPTIONS here. * tree.c (cp_walk_subtrees): Not here. gcc/testsuite/ChangeLog: PR c++/100101 * g++.dg/cpp0x/noexcept67.C: New test.
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 13cc61c..dca947b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -5415,11 +5415,6 @@ cp_walk_subtrees (tree *tp, int *walk_subtrees_p, walk_tree_fn func,
}
break;
- case FUNCTION_TYPE:
- case METHOD_TYPE:
- WALK_SUBTREE (TYPE_RAISES_EXCEPTIONS (*tp));
- break;
-
default:
return NULL_TREE;
}