This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11790] New: accepts illegal (referring variable from templated base class)
- From: "shuki_duv at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Aug 2003 15:15:34 -0000
- Subject: [Bug c++/11790] New: accepts illegal (referring variable from templated base class)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11790
Summary: accepts illegal (referring variable from templated base
class)
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shuki_duv at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
template <typename Type>
struct Base;
template <typename Type>
struct Derived
: public Base<Type>
{
int get() { return b; }
};
template <typename Type>
struct Base
{
int b;
};
int
main()
{
Derived<char> d;
}
reference to b should be qualified with Base<Type>:: (or imported with using
declaration) for this code to be legal.