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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr101.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// Origin: Giovanni Bajo 
3
// DR101: Redeclaration of extern "C" names via using-declarations
4
 
5
namespace Test1 {
6
 
7
  typedef unsigned int X;
8
  extern "C" void f1();
9
  namespace N {
10
    typedef unsigned int X;
11
    extern "C" void f1();
12
  }
13
  using N::f1; // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
14
  using N::X;  // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
15
}
16
 
17
 
18
namespace Test2 {
19
 
20
  typedef unsigned int X;   // { dg-bogus "X" "" }
21
  extern "C" int f2();
22
  namespace N {
23
    typedef unsigned int X; // { dg-bogus "X" "" }
24
    extern "C" int f2();
25
  }
26
  using namespace N;
27
  int i = f2(); // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
28
  X x;          // { dg-bogus "" "redeclaration through 'using' should not be ambiguous" }
29
 
30
}

powered by: WebSVN 2.1.0

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