URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [koenig5.C] - Rev 749
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// Function pointers are ignored in Koenig lookup. (DR 218)
namespace A{
void foo();
struct X{};
void (*bar)(X*)=0; // { dg-message "A::bar" }
}
using A::X;
void (*foo)(X*)=0;
void g()
{
foo(new X); // ok -- DR 218 says that we find the global
// foo variable first, and therefore do not
// perform argument-dependent lookup.
bar(new X); // { dg-error "not declared" }
// { dg-message "suggested alternative" "suggested alternative" { target *-*-* } 17 }
}
Go to most recent revision | Compare with Previous | Blame | View Log