Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.bugs/900221_01.C

raw
1 // { dg-do assemble }
2 // g++ 1.36.1 bug 900221_01
3
4 // Ref: 3.2
5 //
6 // Section 3.2 of the C++ 2.0 Reference Manual says:
7 //
8 // "Names of formal arguments for a function are treated as if they
9 // were declared in the outermost block of that function"
10 //
11 // g++ does not enforce this treatment.
12
13 // Cfront 2.0 passes this test.
14
15 // keywords: scope, formal parameters
16
17 void function (int arg1)
18 {
19 int arg1; // { dg-error "" } redeclaration of arg1
20 }
21
22 int main () { return 0; }