URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// g++ 1.36.1 bug 900127_01
|
// g++ 1.36.1 bug 900127_01
|
|
|
// g++ often fails to detect (and issue errors for) ambiguous overload
|
// g++ often fails to detect (and issue errors for) ambiguous overload
|
// situations. In such cases, one of the possibilities is chosen
|
// situations. In such cases, one of the possibilities is chosen
|
// (apparently arbitrarily). Errors should be issued instead.
|
// (apparently arbitrarily). Errors should be issued instead.
|
|
|
// Cfront 2.0 passes this test.
|
// Cfront 2.0 passes this test.
|
|
|
// keywords: function overloading, ambiguity
|
// keywords: function overloading, ambiguity
|
|
|
void foo (int);
|
void foo (int);
|
int foo (void);
|
int foo (void);
|
|
|
typedef int (*f_ptr_t1) (void);
|
typedef int (*f_ptr_t1) (void);
|
typedef void (*f_ptr_t2) (int);
|
typedef void (*f_ptr_t2) (int);
|
|
|
void bar (f_ptr_t1); // { dg-message "note" }
|
void bar (f_ptr_t1); // { dg-message "note" }
|
void bar (f_ptr_t2); // { dg-message "note" }
|
void bar (f_ptr_t2); // { dg-message "note" }
|
|
|
void function ()
|
void function ()
|
{
|
{
|
bar (foo); // { dg-error "ambiguous" }
|
bar (foo); // { dg-error "ambiguous" }
|
}
|
}
|
|
|
int main () { return 0; }
|
int main () { return 0; }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.