| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed unions |
| 3 |
// anon-union file |
| 4 |
// From: "Terry R. Coley" <[email protected]> |
| 5 |
// Date: Tue, 25 Aug 1992 17:33:29 -0700 |
| 6 |
// Subject: possible bug in gcc/g++ |
| 7 |
// Message-ID: <[email protected]> |
| 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 |
|
| 27 |
int main() { |
| 28 |
int dummy; |
| 29 |
} |