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++.old-deja/] [g++.law/] [arg1.C] - Blame information for rev 779

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// GROUPS passed arg-matching
3
// arg-matching file
4
// Subject: argument matching depending on the def order
5
// From: kondo@akane.mech.ibaraki.ac.jp
6
// Date: Fri, 04 Sep 92 17:41:05 JST
7
 
8
#include 
9
//  check the order of declarations
10
class A {
11
public:
12
      void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "candidates" }
13
      void f(int* p) { std::cout << "A(int*)\n"; } // { dg-message "note" }
14
};
15
 
16
class B {
17
public:
18
      void f(int* p) { std::cout << "B(int*)\n"; } // { dg-message "candidates" }
19
      void f(double* p) { std::cout << "B(double*)\n"; } // { dg-message "note" }
20
};
21
 
22
int main()
23
{
24
    A a;
25
    B b;
26
 
27
    a.f(0);// { dg-error "ambiguous" }
28
    b.f(0);// { dg-error "ambiguous" }
29
}
30
 

powered by: WebSVN 2.1.0

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