public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41437]  New: No access control for classes in template functions
@ 2009-09-22 20:10 guillaume dot melquiond at inria dot fr
  2009-09-25  4:44 ` [Bug c++/41437] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: guillaume dot melquiond at inria dot fr @ 2009-09-22 20:10 UTC (permalink / raw)
  To: gcc-bugs

In the following testcase, A::B is a private type of A, yet function f has no
trouble manipulating it. The error is detected by gcc neither in the definition
of f nor in its instantiation in g.

class A { struct B { B(); }; };
template<typename T> void f() { A::B b; }
void g() { f<int>(); }

Tested with the 4.3.3 release and the 20090912 snapshot of 4.5.0.


-- 
           Summary: No access control for classes in template functions
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: guillaume dot melquiond at inria dot fr


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-11-05 23:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41437-4@http.gcc.gnu.org/bugzilla/>
2010-09-24 10:05 ` [Bug 41437] (c++) No access control for classes in template functions redi at gcc dot gnu.org
2012-02-24 16:52 ` [Bug c++/41437] " redi at gcc dot gnu.org
2013-06-21 18:17 ` w.shane.grant at gmail dot com
2014-12-08 10:28 ` redi at gcc dot gnu.org
2020-03-12 16:05 ` redi at gcc dot gnu.org
2020-05-19 13:20 ` ppalka at gcc dot gnu.org
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
2020-06-16 14:30 ` redi at gcc dot gnu.org
2021-01-19 21:20 ` cvs-commit at gcc dot gnu.org
2021-08-04 11:40 ` redi at gcc dot gnu.org
2021-08-27 18:15 ` pinskia at gcc dot gnu.org
2021-11-05 23:18 ` timturnerc at yahoo dot com
2009-09-22 20:10 [Bug c++/41437] New: " guillaume dot melquiond at inria dot fr
2009-09-25  4:44 ` [Bug c++/41437] " pinskia at gcc dot gnu dot org
2010-09-20 15:53 ` redi at gcc dot gnu dot org
2010-09-20 15:54 ` redi at gcc dot gnu dot 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).