diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C new file mode 100644 index 000000000..d01b6aa36 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C @@ -0,0 +1,20 @@ +// { dg-do assemble } +// g++ 1.37.1 bug 900511_03 + +// g++ does not properly shadow names of types with names of data members +// in cases where the type names in question are used in the context of +// formal parameters lists for member functions. + +// keywords: typedef names, shadowing, scope, formal parameter list + +class class0; + +struct struct1 { + int class0; + void member_function (class0 *); // { dg-error "" } invalid use of struct-local member +}; + +void class1::member_function (class0 *p) { // { dg-error "" } +} + +int main () { return 0; } |