2 // g++ 1.37.1 bug 900405_01
4 // The C++ Reference Manual says (in section 5.4) "Types may not be defined
7 // g++ fails to flag errors for cases where an attempt is made to define
8 // a struct, class, union, or enum type within a cast.
10 // keywords: casts, type definitions, tagged types
14 (enum e { red, green } *) 0; // { dg-error "" } type defined in cast
15 (struct s { int member; } *) 0; // { dg-error "" } type defined in cast
16 (union u { int member; } * ) 0; // { dg-error "" } type defined in cast
17 (class c { int member; } *) 0; // { dg-error "" } type defined in cast
20 int main () { return 0; }