This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14376] New: [3.4 regression] scoping problem in template child class
- From: "nick at ilm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2004 00:08:09 -0000
- Subject: [Bug c++/14376] New: [3.4 regression] scoping problem in template child class
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
the following code does not compile with the 20040225 snapshot of gcc-3.4, and
compiles correctly with gcc-3.3.2:
---------------
template <class T> struct A { T x; };
template <class T>
struct B : public A<T> {
B(const A<T> &a) { x = a.x; }
};
---------------
test.C: In constructor `B<T>::B(const A<T>&)':
test.C:5: error: `x' undeclared (first use this function)
test.C:5: error: (Each undeclared identifier is reported only once for each
function it appears in.)
> /dept/rnd/vendor/gcc-3.4pre/bin/g++ -v
Reading specs from
/dept/rnd/vendor/gcc-3.4-20040225/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc-3.4-20040225/configure
--prefix=/dept/rnd/vendor/gcc-3.4-20040225 --enable-threads --enable-languages=c,c++
Thread model: posix
gcc version 3.4.0 20040225 (prerelease)
--
Summary: [3.4 regression] scoping problem in template child class
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nick at ilm dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14376