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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [using9.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: C++ Standard Draft (7.3.3/12)
3
// PR c++/2294: using declarations should not conflict, but only cause
4
//  an ambiguous overload set to be created.
5
 
6
namespace B {
7
  void f(int);     // { dg-message "note" }
8
  void f(double);  // { dg-message "note" }
9
}
10
 
11
namespace C {
12
  void f(int);     // { dg-message "note" }
13
  void f(double);  // { dg-message "note" }
14
  void f(char);    // { dg-message "note" }
15
}
16
 
17
void h()
18
{
19
  using B::f;
20
  using C::f;
21
  f('h');
22
  f(1);         // { dg-error "ambiguous" }
23
  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
24
  void f(int);  // { dg-error "previous using declaration" }
25
}
26
 
27
void m()
28
{
29
  void f(int);
30
  using B::f;   // { dg-error "already declared" }
31
}

powered by: WebSVN 2.1.0

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