Rebase.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900127_01.C
blob1c315b7fadde784b197a2d3efa20687e986cb689
1 // { dg-do assemble  }
2 // g++ 1.36.1 bug 900127_01
4 // g++ often fails to detect (and issue errors for) ambiguous overload
5 // situations.  In such cases, one of the possibilities is chosen
6 // (apparently arbitrarily). Errors should be issued instead.
8 // Cfront 2.0 passes this test.
10 // keywords: function overloading, ambiguity
12 void foo (int);
13 int foo (void);
15 typedef int (*f_ptr_t1) (void);
16 typedef void (*f_ptr_t2) (int);
18 void bar (f_ptr_t1);            // { dg-message "note" } 
19 void bar (f_ptr_t2);            // { dg-message "note" } 
21 void function ()
23   bar (foo);                    // { dg-error "ambiguous" }
26 int main () { return 0; }