diff options
author | Jason Merrill <jason@redhat.com> | 2021-01-27 00:51:01 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-01-27 15:08:05 -0500 |
commit | 9cd7c32549fa334885b716fe98b674f6447fa7c0 (patch) | |
tree | a75a9c54c180f5e49cceec4f6ec3e25cb248cb10 /gcc/tree-ssa-loop-niter.c | |
parent | 55163419211c6f17e3e22c68304384eba35782a3 (diff) | |
download | gcc-9cd7c32549fa334885b716fe98b674f6447fa7c0.zip gcc-9cd7c32549fa334885b716fe98b674f6447fa7c0.tar.gz gcc-9cd7c32549fa334885b716fe98b674f6447fa7c0.tar.bz2 |
c++: Dependent using enum [PR97874]
The handling of dependent scopes and unsuitable scopes in lookup_using_decl
was a bit convoluted; I tweaked it for a while and then eventually
reorganized much of the function to hopefully be clearer. Along the way I
noticed a couple of ways we were mishandling inherited constructors.
The local binding for a dependent using is the USING_DECL.
Implement instantiation of a dependent USING_DECL at function scope.
gcc/cp/ChangeLog:
PR c++/97874
* name-lookup.c (lookup_using_decl): Clean up handling
of dependency and inherited constructors.
(finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
* pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
gcc/testsuite/ChangeLog:
PR c++/97874
* g++.dg/lookup/using4.C: No error in C++20.
* g++.dg/cpp0x/decltype37.C: Adjust message.
* g++.dg/template/crash75.C: Adjust message.
* g++.dg/template/crash76.C: Adjust message.
* g++.dg/cpp0x/inh-ctor36.C: New test.
* g++.dg/cpp1z/inh-ctor39.C: New test.
* g++.dg/cpp2a/using-enum-7.C: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
0 files changed, 0 insertions, 0 deletions