OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [koenig5.C] - Rev 853

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

// { dg-do assemble  }
// To find function pointers in Koenig lookup is ok as long as we only find one.
namespace A{
  void foo();             
  struct X{};
  void (*bar)(X*)=0;
}
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);            // ok
}

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

powered by: WebSVN 2.1.0

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