This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix PR4802, 5387
Jason Merrill <jason@redhat.com> writes:
| >>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:
|
| > Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> writes:
| > | Hi
| > |
| > | This patch fixes PR4802 and PR5387 (not a regression). With the patch
| > | type access is now enforced for typename types while previously they are
| > | all treated as public.
|
|
| > 1) I was under the impression that enforce_access() is used only
| > for controling access in a derived class to a member defined in
| > base-classes. The comment reads:
|
| > /* If the current scope isn't allowed to access DECL along
| > BASETYPE_PATH, give an error. The most derived class in
| > BASETYPE_PATH is the one used to qualify DECL. */
|
| > Or do I misread the comment?
|
| You misread it;
Thanks, Kriang sent me a mail explaining the right place to look at.
[...]
| > That is not an error when A<> is explicitly instantiated:
|
| Actually, it is.
Yes, for some reasons, I was under the impression that we shouldn't
catch that (one more item to remove from my template-with-silly-things
list); the passage I cited evidenced my confusion.
-- Gaby