2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900321_05.C
blobeb08d1a5645136fbdae909e8c3891d309f5f1aca
1 // { dg-do run  }
2 // g++ 1.37.1 bug 900321_05
4 // The following code is legal as far as the ANSI C standard, GCC, and
5 // cfront are concerned, however g++ issues errors for the lines indicated.
7 // Cfront 2.0 passes this test.
9 // keywords: operator[], pointers, index
11 char c;
12 char *cp;
13 int i;
15 void function ()
17   c = 3["abcdef"];      // { dg-bogus "" } 
18   c = i[cp];            // { dg-bogus "" } 
21 int main () { return 0; }