This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51190] New: [4.7 Regression] 'using' causing trouble


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]