URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do assemble }
|
// { dg-do assemble }
|
//
|
//
|
// Copyright (C) 2000 Free Software Foundation, Inc.
|
// Copyright (C) 2000 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 14 Aug 2000
|
// Contributed by Nathan Sidwell 14 Aug 2000
|
|
|
// A pointer to member can only be formed by `&T::m', however, other forms
|
// A pointer to member can only be formed by `&T::m', however, other forms
|
// are ok for pointer to static member. Thus the error can only be determined
|
// are ok for pointer to static member. Thus the error can only be determined
|
// after overload resolution. In template deduction, this can disambiguate
|
// after overload resolution. In template deduction, this can disambiguate
|
// otherwise ambiguous cases.
|
// otherwise ambiguous cases.
|
|
|
struct A
|
struct A
|
{
|
{
|
static int f (int);
|
static int f (int);
|
int f (short);
|
int f (short);
|
void baz ();
|
void baz ();
|
};
|
};
|
|
|
template void foo (int (*)(T)); // { dg-error "" } candidate
|
template void foo (int (*)(T)); // { dg-error "" } candidate
|
template void foo (int (A::*)(T)); // { dg-error "" } candidate
|
template void foo (int (A::*)(T)); // { dg-error "" } candidate
|
|
|
|
|
void A::baz ()
|
void A::baz ()
|
{
|
{
|
foo (&A::f); // { dg-error "" } ambiguous
|
foo (&A::f); // { dg-error "" } ambiguous
|
foo (A::f);
|
foo (A::f);
|
foo (&(A::f));
|
foo (&(A::f));
|
foo (f);
|
foo (f);
|
foo (&f);
|
foo (&f);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.