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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 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 (...);               // { dg-message "N::One" }
12
  void (*Two) (...);            // { dg-message "N::Two" }
13
  namespace Three {}            // { dg-message "N::Three" }
14
}
15
 
16
namespace M
17
{
18
  struct B {};
19
  struct One {};                // { dg-message "M::One" }
20
  void (*Two) (...);            // { dg-message "M::Two" }
21
  void Three (...);             // { dg-message "M::Three" }
22
}
23
 
24
namespace O
25
{
26
  struct C {};
27
  void Two (...);               // { dg-message "O::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
  // { dg-message "suggested alternatives" "suggested alternative for One" { target *-*-* } 34 }
36
 
37
  Two (c); // ok
38
  Two (a, c); // ok
39
  Two (a); // { dg-error "not declared" }
40
  // { dg-message "suggested alternatives" "suggested alternative for Two" { target *-*-* } 39 }
41
  Two (a, a); // error masked by earlier error
42
  Two (b); // error masked by earlier error
43
  Two (a, b); // error masked by earlier error
44
 
45
  Three (b); // ok
46
  Three (a, b); // ok
47
  Three (a); // { dg-error "not declared" }
48
  // { dg-message "suggested alternatives" "suggested alternative for Three" { target *-*-* } 47 }
49
}

powered by: WebSVN 2.1.0

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