public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dodji at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47346] access control for nested type is ignored in class template Date: Thu, 11 Aug 2011 18:54:00 -0000 [thread overview] Message-ID: <bug-47346-4-e6hG41xpdD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47346-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47346 --- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-08-11 18:52:54 UTC --- Created attachment 24985 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24985 Work in progress patch I am currently testing this patch. The problem I see is twofold. First, the infrastructure I added a while back to do access checking of references to types, at template instantiation time, was limited to typedefs. This bug seems to suggest that the access checking should be done for references to all types. Not just typedefs. Second, add_typedef_to_current_template_for_access_check assumes that a "current template" is present. When we are parsing the class header (for e.g the base clause) or the template parameter list, the "current template" is not present yet. In that case, a possible solution is the stash away, for some short while, the types access that is to be checked, until the current template becomes available. This is the approach taken by this patch.
next prev parent reply other threads:[~2011-08-11 18:54 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-18 15:42 [Bug c++/47346] New: " redi at gcc dot gnu.org 2011-03-11 18:04 ` [Bug c++/47346] " redi at gcc dot gnu.org 2011-06-13 9:11 ` redi at gcc dot gnu.org 2011-07-28 18:25 ` dodji at gcc dot gnu.org 2011-08-11 18:42 ` dodji at gcc dot gnu.org 2011-08-11 18:54 ` dodji at gcc dot gnu.org [this message] 2011-08-17 15:43 ` dodji at gcc dot gnu.org 2011-09-29 6:11 ` paolo.carlini at oracle dot com 2011-09-30 10:34 ` dodji at seketeli dot org 2011-09-30 10:44 ` paolo.carlini at oracle dot com 2011-09-30 12:06 ` dodji at seketeli dot org 2011-10-18 11:32 ` paolo.carlini at oracle dot com 2013-03-27 13:28 ` jason at gcc dot gnu.org 2013-07-06 23:42 ` paolo.carlini at oracle dot com 2013-11-12 1:07 ` redi at gcc dot gnu.org 2013-11-19 16:28 ` paolo.carlini at oracle dot com 2020-06-16 12:59 ` cvs-commit at gcc dot gnu.org 2020-06-16 12:59 ` cvs-commit at gcc dot gnu.org 2020-06-16 13:02 ` ppalka at gcc dot gnu.org 2020-06-16 13:03 ` ppalka at gcc dot gnu.org 2021-08-05 7:58 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-47346-4-e6hG41xpdD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).