public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66475] Access checking in templates circumvented with 'using' (C++11) Date: Thu, 12 Mar 2020 15:56:58 +0000 [thread overview] Message-ID: <bug-66475-4-sZPgbBM9bN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66475-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66475 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |7.0 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Fixed by r243624: re PR c++/69481 (ICE with C++11 alias using with templates) cp/ PR c++/69481 * cp-tree.h (TYPE_TEMPLATE_INFO): Remove alias type checking. (TYPE_ALIAS_TEMPLATE_INFO): New. (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): New. Use those macros. * error.c (dump_alias_template_specialization): Adjust. * pt.c (maybe_process_partial_specialization) iterative_has_template_arg, find_parameter_packs_r, alias_template_specialization_p, dependent_alias_template_spec_p, get_underlying_template, lookup_template_class_1, unify): Adjust template using decl access. testsuite/ PR c++/69481 * g++.dg/cpp0x/pr69481.C: New. Since GCC 7.1 we print: 66475.cc:19:11: error: 'using Base = struct Foo<int>' is private within this context Bar<int>::Base x; // shouldn't compile, Base is private ^~~~ 66475.cc:10:22: note: declared private here using Base = Foo<T>; // the combination of this and the public export of a type from Base below, causes this example to compile even though it shouldn't ^
next prev parent reply other threads:[~2020-03-12 15:56 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-06-09 16:47 [Bug c++/66475] New: " zerolo at gmail dot com 2015-06-09 16:54 ` [Bug c++/66475] " redi at gcc dot gnu.org 2020-03-12 15:56 ` redi at gcc dot gnu.org [this message] 2021-07-27 8:46 ` pinskia at gcc dot gnu.org 2021-08-05 7:39 ` 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-66475-4-sZPgbBM9bN@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).