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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [koenig5.C] - Blame information for rev 320

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

Line No. Rev Author Line
1 301 jeremybenn
// Koenig lookup is not defined as intended in the std.  DR 218 gives
2
// an indication of what is meant.  This test case encapsulates the
3
// current conservative behaviour
4
 
5
// Copyright (C) 2006 Free Software Foundation, Inc.
6
// Contributed by Nathan Sidwell 27 Aug 2006 
7
 
8
namespace N
9
{
10
  struct A {};
11
  void One (...);
12
  void (*Two) (...);
13
  namespace Three {}
14
}
15
 
16
namespace M
17
{
18
  struct B {};
19
  struct One {};
20
  void (*Two) (...);
21
  void Three (...);
22
}
23
 
24
namespace O
25
{
26
  struct C {};
27
  void Two (...);
28
}
29
 
30
void g (N::A *a, M::B *b, O::C *c)
31
{
32
  One (a); // ok
33
  One (a, b); // ok
34
  One (b); // { dg-error "not declared" }
35
 
36
  Two (c); // ok
37
  Two (a, c); // ok
38
  Two (a); // { dg-error "not declared" }
39
  Two (a, a); // error masked by earlier error
40
  Two (b); // error masked by earlier error
41
  Two (a, b); // error masked by earlier error
42
 
43
  Three (b); // ok
44
  Three (a, b); // ok
45
  Three (a); // { dg-error "not declared" }
46
}

powered by: WebSVN 2.1.0

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