aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/mmx.md
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-03-18 22:52:32 -0400
committerJason Merrill <jason@redhat.com>2022-05-15 12:43:30 -0400
commit4df735e01e319997841574f353d2aa076a0335c2 (patch)
tree5d8ff6e326d0233e450a1e59d7ecc30404424fa1 /gcc/config/i386/mmx.md
parent87e1f023aae945aedd7ea046e06b4f52318913f7 (diff)
downloadgcc-4df735e01e319997841574f353d2aa076a0335c2.zip
gcc-4df735e01e319997841574f353d2aa076a0335c2.tar.gz
gcc-4df735e01e319997841574f353d2aa076a0335c2.tar.bz2
c++: hidden friend access [DR1699]
It has come up several times that Clang considers hidden friends of a class to be sufficiently memberly to be covered by a friend declaration naming the class. This is somewhat unclear in the standard: [class.friend] says "Declaring a class to be a friend implies that private and protected members of the class granting friendship can be named in the base-specifiers and member declarations of the befriended class." A hidden friend is a syntactic member-declaration, but is it a "member declaration"? CWG was ambivalent, and referred the question to EWG as a design choice. But recently Patrick mentioned that the current G++ choice not to treat it as a "member declaration" was making his library work significantly more cumbersome, so let's go ahead and vote the other way. This means that the testcases for 100502 and 58993 are now accepted. DR1699 PR c++/100502 PR c++/58993 gcc/cp/ChangeLog: * friend.cc (is_friend): Hidden friends count as members. * search.cc (friend_accessible_p): Likewise. gcc/testsuite/ChangeLog: * g++.dg/template/access37.C: Now OK. * g++.dg/template/friend69.C: Now OK. * g++.dg/lookup/friend23.C: New test.
Diffstat (limited to 'gcc/config/i386/mmx.md')
0 files changed, 0 insertions, 0 deletions