gcc/testsuite/g++.old-deja/g++.bugs/900208_02.C
raw| 1 | // { dg-do run } |
| 2 | // g++ 1.36.1 bug 900208_02 |
| 3 | |
| 4 | // g++ does not allow a static member of a class/struct/union to be |
| 5 | // declared as an array without an explicit upper bound. |
| 6 | |
| 7 | // Cfront 2.0 passes this test. |
| 8 | |
| 9 | // keywords: static data members, arrays, dimension, array bound |
| 10 | |
| 11 | class class0 { |
| 12 | public: |
| 13 | static int class0_data_member_0[]; // { dg-bogus "" } |
| 14 | }; |
| 15 | |
| 16 | int class0::class0_data_member_0[3] = { 1, 2, 3 }; // { dg-bogus "" } |
| 17 | |
| 18 | int main () { return 0; } |