This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13095] New: GCC accepts invalid using declaration
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2003 00:13:27 -0000
- Subject: [Bug c++/13095] New: GCC accepts invalid using declaration
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code in invalid IMHO, since using declarations shall refer to
members of base classes (according to [7.3.3]/4), but B<T> is not a base class.
===========================================
template <typename> struct A
{
int i;
};
template <typename T> struct B : A<T>
{
using B<T>::i;
int foo() { return i; }
};
===========================================
However, gcc accepts the code since at least 2.95.x.
--
Summary: GCC accepts invalid using declaration
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13095