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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [friend7.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// PR c++/7874: Don't inject friend functions into global name space.
3
 
4
namespace N { template struct A { friend void f(A) { } }; }
5
int main()
6
{
7
   N::A a;
8
   N::f(a);             // { dg-error "not a member" }
9
}
10
 
11
struct S { friend void g(); friend void h(S); };
12
struct T { friend void g(); friend void h(T); };
13
void i() {
14
  g();                  // { dg-error "not declared" }
15
  S s;
16
  h(s);
17
  T t;
18
  h(t);
19
}

powered by: WebSVN 2.1.0

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