This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15372] New: [3.4 regression] parse error compiling template classes w/ inheritence
- From: "bje at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2004 00:48:26 -0000
- Subject: [Bug c++/15372] New: [3.4 regression] parse error compiling template classes w/ inheritence
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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