blob: f89d1e5c93bfbc6d2edd05c777dfe8d2e21e9ac6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// { dg-do compile }
// Search std, __cxxabiv1, and global namespaces, plus one more.
// { dg-options "--param cxx-max-namespaces-for-diagnostic-help=4" }
#define NSPACE(NAME) namespace NAME { int foo; }
namespace A
{
int foo; // { dg-message "A::foo" "suggested alternative" }
}
namespace B
{
int foo;
}
namespace C
{
int foo;
}
namespace D
{
int foo;
}
namespace E
{
int foo;
}
int bar()
{
return foo; // { dg-error "was not declared" }
// { dg-message "maximum limit of 4 namespaces" "maximum limit" { target *-*-* } .-1 }
// { dg-message "suggested alternative" "suggested alternative" { target *-*-* } .-2 }
}
|