https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71209

            Bug ID: 71209
           Summary: [c++] erroneous 'is not a base class of' error
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

The below code compiles fine with clang and a version of gcc build from trunk
on 20160428, but with the trunk version from 20160519, it gives this bad error
message:

 B<T>::B()
a.cpp:7:18: error: ‘A’ is not a base of ‘B<T>’
   B() { this->A::table_clear; }

The bugs causing major libraries like intel's TBB not to compile.

//////////////////////////////////////////////////////////
class A {                                                                       
  int table_clear;                                                              
};                                                                              

template <typename T>                                                           
class B : T {                                                                   
  B() { this->A::table_clear; }                                                 
};                                                                              

int main() {} 
//////////////////////////////////////////////////////////

Reply via email to