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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr101.C] - Blame information for rev 301

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 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" "" { xfail *-*-* } }
21
  extern "C" int f2();
22
  namespace N {
23
    typedef unsigned int X; // { dg-bogus "X" "" { xfail *-*-* } }
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" { xfail *-*-* } }
29
 
30
}
31
 

powered by: WebSVN 2.1.0

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