public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/37804] friend declaration leaks into global scope at template instantiation Date: Sat, 11 Oct 2008 13:08:00 -0000 [thread overview] Message-ID: <20081011130707.28282.qmail@sourceware.org> (raw) In-Reply-To: <bug-37804-16820@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from rguenth at gcc dot gnu dot org 2008-10-11 13:07 ------- Confirmed. The friend declaration seems to inject Internal_B into the global namespace at the point of instantiating the template A. Reduced testcase: template <typename T> struct A { friend class B; }; A<int> a; // here we inject a declaration of B into the global namespace B some_function(); // B should not be declared here -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |accepts-invalid Last reconfirmed|0000-00-00 00:00:00 |2008-10-11 13:07:05 date| | Summary|Nested type leaks to global |friend declaration leaks |scope |into global scope at | |template instantiation http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804
next prev parent reply other threads:[~2008-10-11 13:08 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-10-11 12:30 [Bug c++/37804] New: Nested type leaks to global scope therealfroggey at gmail dot com 2008-10-11 13:08 ` rguenth at gcc dot gnu dot org [this message] 2008-10-11 17:05 ` Andrew Thomas Pinski 2008-10-11 17:06 ` [Bug c++/37804] friend declaration leaks into global scope at template instantiation pinskia at gmail dot com 2008-10-11 18:47 ` rguenth at gcc dot gnu dot org 2008-12-30 11:53 ` rguenth at gcc dot gnu dot org 2009-01-15 23:07 ` jason at gcc dot gnu dot org [not found] <bug-37804-4@http.gcc.gnu.org/bugzilla/> 2014-06-01 19:02 ` ilya.konstantinov at gmail dot com 2014-06-02 8:40 ` ilya.konstantinov at gmail dot com 2014-06-02 9:32 ` redi at gcc dot gnu.org 2021-08-03 5:05 ` 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=20081011130707.28282.qmail@sourceware.org \ --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).