OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [parse/] [error20.C] - Diff between revs 301 and 338

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
// PR c++/17821
// PR c++/17821
struct A {
struct A {
  A(int i) {}
  A(int i) {}
};
};
struct B {
struct B {
  int i;
  int i;
};
};
struct C {
struct C {
  B* p;
  B* p;
};
};
int main() {
int main() {
  C c;
  C c;
  A(c.p.i); // { dg-error "9:request for member 'i' in 'c.C::p', which is of non-class type 'B" }
  A(c.p.i); // { dg-error "9:request for member 'i' in 'c.C::p', which is of non-class type 'B" }
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.