diff options
| -rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ns/type1.C | 18 | ||||
| -rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/access9.C | 10 | ||||
| -rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/redecl3.C | 8 |
3 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/type1.C b/gcc/testsuite/g++.old-deja/g++.ns/type1.C new file mode 100644 index 0000000..21398f9 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/type1.C @@ -0,0 +1,18 @@ +// Test that using an elaborated-type-specifier in a namespace to refer +// to a class outside the namespace does not cause its name to be considered +// declared in the namespace. + +// Contributed by Jason Merrill <jason@cygnus.com> +// Build don't link: + +struct A { }; + +int A; + +namespace N { + struct A *f (); +} + +using namespace N; + +struct A *a; diff --git a/gcc/testsuite/g++.old-deja/g++.other/access9.C b/gcc/testsuite/g++.old-deja/g++.other/access9.C new file mode 100644 index 0000000..9312653 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/access9.C @@ -0,0 +1,10 @@ +// Test that g++ allows friends to use private types in their declarations. +// Build don't link: + +class A { + typedef int I; + friend I f (I); +}; + +A::I f (A::I); +A::I f (A::I) { return 0; } diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl3.C b/gcc/testsuite/g++.old-deja/g++.other/redecl3.C new file mode 100644 index 0000000..d2a5fed --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/redecl3.C @@ -0,0 +1,8 @@ +// Bug: g++ thought this was a redeclaration of a local variable. +// Build don't link: + +int i; +int main () +{ + extern int i; +} |
