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 }
|
// To find function pointers in Koenig lookup is ok as long as we only find one.
|
// To find function pointers in Koenig lookup is ok as long as we only find one.
|
namespace A{
|
namespace A{
|
void foo();
|
void foo();
|
struct X{};
|
struct X{};
|
void (*bar)(X*)=0;
|
void (*bar)(X*)=0;
|
}
|
}
|
using A::X;
|
using A::X;
|
|
|
void (*foo)(X*)=0;
|
void (*foo)(X*)=0;
|
|
|
void g()
|
void g()
|
{
|
{
|
foo(new X); // ok -- DR 218 says that we find the global
|
foo(new X); // ok -- DR 218 says that we find the global
|
// foo variable first, and therefore do not
|
// foo variable first, and therefore do not
|
// perform argument-dependent lookup.
|
// perform argument-dependent lookup.
|
bar(new X); // ok
|
bar(new X); // ok
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.