This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15372] New: [3.4 regression] parse error compiling template classes w/ inheritence


The following test case produces a parse error, which I believe is wrong:

template<class A> class One {
public:
        int x;
};

template<class B> class Two : public One<B> {
public:
        int test(void) { return x; }
};

The error message from mainline is slightly different to 3.4, but also rejects
the code:

/home/bje/foo.C: In member function `int Two<B>::test()':
/home/bje/foo.C:8: error: `x' was not declared in this scope

-- 
           Summary: [3.4 regression] parse error compiling template classes
                    w/ inheritence
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bje at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]