public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26693]  New: [4.0/4.1/4.2 regression] Access checks not performed for types in templates
@ 2006-03-15 13:20 reichelt at gcc dot gnu dot org
  2006-03-15 13:24 ` [Bug c++/26693] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-03-15 13:20 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code is accepted since GCC 3.4.0:

================================================
class A
{
  private:
    typedef int X;
};

template<int> int foo() { return A::X(); } // A::X is private!

int i=foo<0>();
================================================

If I make foo a non-template function, the code is correctly rejected.


-- 
           Summary: [4.0/4.1/4.2 regression] Access checks not performed for
                    types in templates
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-05-05 13:07 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-15 13:20 [Bug c++/26693] New: [4.0/4.1/4.2 regression] Access checks not performed for types in templates reichelt at gcc dot gnu dot org
2006-03-15 13:24 ` [Bug c++/26693] " pinskia at gcc dot gnu dot org
2006-06-04 18:06 ` mmitchel at gcc dot gnu dot org
2006-09-07  7:18 ` jason at gcc dot gnu dot org
2007-02-03 16:24 ` [Bug c++/26693] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org
2007-02-03 17:27 ` jsm28 at gcc dot gnu dot org
2007-02-14  9:10 ` mmitchel at gcc dot gnu dot org
2008-07-04 20:22 ` [Bug c++/26693] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-08-21 11:59 ` paolo dot carlini at oracle dot com
2008-10-28 12:17 ` dodji at gcc dot gnu dot org
2008-10-29 21:56 ` dodji at gcc dot gnu dot org
2008-11-01 14:31 ` dodji at gcc dot gnu dot org
2009-01-21 16:15 ` dodji at gcc dot gnu dot org
2009-01-22  7:16 ` dodji at gcc dot gnu dot org
2009-03-24 13:55 ` howarth at nitro dot med dot uc dot edu
2009-03-28 20:19 ` reichelt at gcc dot gnu dot org
2009-03-31 19:31 ` [Bug c++/26693] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-04-02  9:24 ` dodji at gcc dot gnu dot org
2009-04-02  9:36 ` dodji at gcc dot gnu dot org
2009-04-02  9:39 ` dodji at gcc dot gnu dot org
2009-04-02  9:45 ` jakub at gcc dot gnu dot org
2009-04-29  7:09 ` pinskia at gcc dot gnu dot org
2009-05-05 13:07 ` jwakely dot gcc at gmail dot com

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