1 // { dg-do assemble }
2 // GROUPS passed unions
3 // anon-union file
4 // From: "Terry R. Coley" <terry@wag.caltech.edu>
5 // Date: Tue, 25 Aug 1992 17:33:29 -0700
6 // Subject: possible bug in gcc/g++
7 // Message-ID: <199208260033.AA19417@brahms.wag.caltech.edu>
8
9 typedef enum { BADBINOP = 0, PLUS, MINUS, MULT, DIV, POWR } binoptype;
10 typedef enum { BADUNOP = 0, NEG = POWR+1, SIN, COS, TAN } unoptype;
11
12 typedef struct {
13 const char *s;
14 union {
15 binoptype bop;
16 unoptype uop;
17 };
18 }
19 op_to_charp;
20
21 op_to_charp BINOPS[] = { {"+", PLUS},
22 {"-", MINUS},
23 {"*", MULT},
24 {"/", DIV},
25 {"^", POWR} };
26
main()27 int main() {
28 int dummy;
29 }
30