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++.bugs/] [900127_01.C] - Blame information for rev 305

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

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// g++ 1.36.1 bug 900127_01
3
 
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.
7
 
8
// Cfront 2.0 passes this test.
9
 
10
// keywords: function overloading, ambiguity
11
 
12
void foo (int);
13
int foo (void);
14
 
15
typedef int (*f_ptr_t1) (void);
16
typedef void (*f_ptr_t2) (int);
17
 
18
void bar (f_ptr_t1);            // { dg-message "note" }
19
void bar (f_ptr_t2);            // { dg-message "note" }
20
 
21
void function ()
22
{
23
  bar (foo);                    // { dg-error "ambiguous" }
24
}
25
 
26
int main () { return 0; }

powered by: WebSVN 2.1.0

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