aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-01-20 09:43:48 -0500
committerPatrick Palka <ppalka@redhat.com>2021-01-20 09:43:48 -0500
commit79e1251b642db038df276153c9f2ec6b82e56162 (patch)
treeec8ef4360954f0164fe7800a45e3b85d96079c81 /gcc/fortran
parentea74a3f548eb321429c371e327e778e63d9128a0 (diff)
downloadgcc-79e1251b642db038df276153c9f2ec6b82e56162.zip
gcc-79e1251b642db038df276153c9f2ec6b82e56162.tar.gz
gcc-79e1251b642db038df276153c9f2ec6b82e56162.tar.bz2
c++: Defer access checking when processing bases [PR82613]
When parsing the base-clause of a class declaration, we need to defer access checking until the entire base-clause has been seen, so that access can be properly checked relative to the scope of the class with all its bases attached. This allows us to accept the declaration of struct D from Example 2 of [class.access.general] (access12.C below). Similarly when substituting into the base-clause of a class template, which is the subject of PR82613. gcc/cp/ChangeLog: PR c++/82613 * parser.c (cp_parser_class_head): Defer access checking when parsing the base-clause until all bases are seen and attached to the class type. * pt.c (instantiate_class_template): Likewise when substituting into dependent bases. gcc/testsuite/ChangeLog: PR c++/82613 * g++.dg/parse/access12.C: New test. * g++.dg/template/access35.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions