FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900127_01.C
blob7c24d08bc10dfb9f5e49225dad3e2ecf4d89c18f
1 // g++ 1.36.1 bug 900127_01
3 // g++ often fails to detect (and issue errors for) ambiguous overload
4 // situations.  In such cases, one of the possibilities is chosen
5 // (apparently arbitrarily). Errors should be issued instead.
7 // Cfront 2.0 passes this test.
9 // keywords: function overloading, ambiguity
11 void foo (int);
12 int foo (void);
14 typedef int (*f_ptr_t1) (void);
15 typedef void (*f_ptr_t2) (int);
17 void bar (f_ptr_t1);            // ERROR - 
18 void bar (f_ptr_t2);            // ERROR - 
20 void function ()
22   bar (foo);                    // ERROR - ambiguous
25 int main () { return 0; }