aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-08-29 18:17:22 -0400
committerJason Merrill <jason@redhat.com>2021-08-30 17:25:21 -0400
commit8960a29b18b830ff0490b7f52051903fba472e45 (patch)
tree35a7a49679fa0b3925eb27ea96f7eaf295f5e535 /gcc/config.gcc
parent729f6881cfcc6df3c15a1dd4ebd45bc46bb8f3e9 (diff)
downloadgcc-8960a29b18b830ff0490b7f52051903fba472e45.zip
gcc-8960a29b18b830ff0490b7f52051903fba472e45.tar.gz
gcc-8960a29b18b830ff0490b7f52051903fba472e45.tar.bz2
c++: limit instantiation with ill-formed class [PR96286]
I noticed that after the static_assert failures in lwg3466.cc, we got various follow-on errors because we went ahead and tried to instantiate the promise<T> member functions even after instantiating the class itself ran into problems. Interrupting instantiation of the class itself seems likely to cause error-recovery problems, but preventing instantiation of member functions seems strictly better for error-recovery. This doesn't fix any of the specific testcases in PR96286, but addresses part of that problem space. PR c++/96286 gcc/cp/ChangeLog: * cp-tree.h (struct lang_type): Add erroneous bit-field. (CLASSTYPE_ERRONEOUS): New. * pt.c (limit_bad_template_recursion): Check it. (instantiate_class_template_1): Set it. libstdc++-v3/ChangeLog: * testsuite/30_threads/promise/requirements/lwg3466.cc: Remove dg-prune-outputs. gcc/testsuite/ChangeLog: * g++.dg/template/access2.C: Split struct A.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions