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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr101.C] - Diff between revs 154 and 816

Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// { dg-do compile }
// { dg-do compile }
// Origin: Giovanni Bajo 
// Origin: Giovanni Bajo 
// DR101: Redeclaration of extern "C" names via using-declarations
// DR101: Redeclaration of extern "C" names via using-declarations
namespace Test1 {
namespace Test1 {
  typedef unsigned int X;
  typedef unsigned int X;
  extern "C" void f1();
  extern "C" void f1();
  namespace N {
  namespace N {
    typedef unsigned int X;
    typedef unsigned int X;
    extern "C" void f1();
    extern "C" void f1();
  }
  }
  using N::f1; // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
  using N::f1; // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
  using N::X;  // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
  using N::X;  // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
}
}
namespace Test2 {
namespace Test2 {
  typedef unsigned int X;   // { dg-bogus "X" "" { xfail *-*-* } }
  typedef unsigned int X;   // { dg-bogus "X" "" { xfail *-*-* } }
  extern "C" int f2();
  extern "C" int f2();
  namespace N {
  namespace N {
    typedef unsigned int X; // { dg-bogus "X" "" { xfail *-*-* } }
    typedef unsigned int X; // { dg-bogus "X" "" { xfail *-*-* } }
    extern "C" int f2();
    extern "C" int f2();
  }
  }
  using namespace N;
  using namespace N;
  int i = f2(); // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
  int i = f2(); // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
  X x;          // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" { xfail *-*-* } }
  X x;          // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" { xfail *-*-* } }
}
}
 
 

powered by: WebSVN 2.1.0

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