]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.old-deja/g++.bugs/900404_03.C
call.c (struct conversion_info): Rename 'from_type' to 'from'.
[thirdparty/gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900404_03.C
1 // { dg-do assemble }
2 // g++ 1.37.1 bug 900404_03
3
4 // g++ fails to be able to properly flag errors for even simple cases of
5 // ambiguous overload resolution (such as the one shown below).
6
7 // Cfront 2.0 passes this test.
8
9 // keywords: overloading, ambiguity, resolution
10
11 void function0 (int i, char c) // { dg-message "function0" }
12 {
13 i = c;
14 }
15
16 void function0 (char c, int i) // { dg-message "function0" }
17 {
18 i = c;
19 }
20
21 char c;
22
23 void test ()
24 {
25 function0 (c,c); // { dg-error "ambiguous" }
26 }
27
28 int main () { return 0; }