OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.bugs / 900404_07.C
1 // g++ 1.37.1 bug 900404_07
2
3 // It is illegal to use a cast to attempt to convert an object type
4 // to a non-scalar type (e.g. an array type).
5
6 // g++ fails to properly flag as errors such illegal uses of array types.
7
8 // keywords: array types, casts, type conversion
9
10 typedef int array_type[10];
11
12 array_type *ap;
13
14 void foo ()
15 {
16   int i = *((array_type) *ap);  /* ERROR - missed */
17 }