public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37804]  New: Nested type leaks to global scope
@ 2008-10-11 12:30 therealfroggey at gmail dot com
  2008-10-11 13:08 ` [Bug c++/37804] friend declaration leaks into global scope at template instantiation rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: therealfroggey at gmail dot com @ 2008-10-11 12:30 UTC (permalink / raw)
  To: gcc-bugs

GCC versions used:
gcc version 4.1.2
gcc version 4.4.0 20081011 (experimental) (GCC) svn revision 141055
Command line used: g++ -Wall -Wextra bug.cc

The following code should fail to compile as Internal_B is a private class
within class A.
Both tested version of gcc successfully compile it with no warnings.

------------

template <typename T>
class A
{
private:
  class Internal_A
  {
    friend class Internal_B;
  };
  class Internal_B { };
  Internal_A a;
};

A<int> a;

Internal_B some_function();


-- 
           Summary: Nested type leaks to global scope
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: therealfroggey at gmail dot com
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-37804-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-08-03  5:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [Bug c++/37804] friend declaration leaks into global scope at template instantiation rguenth at gcc dot gnu dot org
2008-10-11 17:05 ` [Bug c++/37804] New: Nested type leaks to global scope 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

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).