blob: 12ae64a36a0f6771d42a9f98ccb1a923c35756ba (
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
38
39
40
41
42
43
44
45
46
47
|
// { dg-do assemble }
// g++ 1.36.1 bug 900127_02
// g++ (mostly) keeps separate name spaces for the declarations of data
// objects and functions.
// This means that a single name may be declared as both a data object and
// a function within a given scope.
// This fact allows programmers to write code which is not portable to the
// Cfront translator (which keeps a single namespace for these entities).
// This can also lead to ambiguity when the & (address-of) operator is used.
// Cfront 2.0 passes this test.
// keywords: name spaces, overloading
int global0; // { dg-error "" }
int global0 (); // { dg-error "" }
int global1 (); // { dg-error "" } xref for below
int global1; // { dg-error "" } caught
struct struct_0 {
int class_local (); // { dg-message "" }
int class_local; // { dg-error "" }
};
struct struct_1 {
int class_local; // { dg-message "" }
int class_local (); // { dg-error "" }
};
void function_0 ()
{
int function_0_local; // { dg-error "" }
extern int function_0_local (); // { dg-error "" }
}
void function_1 ()
{
int function_1_local (); // { dg-error "" }
extern int function_1_local; // { dg-error "" }
}
int main () { return 0; }
|