This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51190] New: [4.7 Regression] 'using' causing trouble
- From: "reichelt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Nov 2011 10:42:55 +0000
- Subject: [Bug c++/51190] New: [4.7 Regression] 'using' causing trouble
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51190
Bug #: 51190
Summary: [4.7 Regression] 'using' causing trouble
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
The following valid code snippet is rejected on trunk:
========================================
struct A
{
int i;
};
template<typename> struct B
{
A* p;
};
template<typename T> struct C : B<T>
{
using B<T>::p;
C() { p->i; }
int i1, i2, i3, i4, i5;
};
C<A> c;
========================================
bug.cc: In instantiation of 'C<T>::C() [with T = A]':
bug.cc:20:6: required from here
bug.cc:15:9: error: base operand of '->' has non-pointer type 'B<A>'
I think this is also related to PR 51189. It looks something with 'using' got
screwed up.