]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.old-deja/g++.law/arg1.C
call.c (struct conversion_info): Rename 'from_type' to 'from'.
[thirdparty/gcc.git] / gcc / testsuite / g++.old-deja / g++.law / arg1.C
1 // { 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 <iostream>
9 // check the order of declarations
10 class A {
11 public:
12 void f(double* p) { std::cout << "A(double*)\n"; } // { dg-message "note" }
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 "note" }
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