Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/enum-1.c

raw
1 void abort (void);
2 void exit (int);
3
4 typedef enum
5 {
6 END = -1,
7 EMPTY = (1 << 8 ) ,
8 BACKREF,
9 BEGLINE,
10 ENDLINE,
11 BEGWORD,
12 ENDWORD,
13 LIMWORD,
14 NOTLIMWORD,
15 QMARK,
16 STAR,
17 PLUS,
18 REPMN,
19 CAT,
20 OR,
21 ORTOP,
22 LPAREN,
23 RPAREN,
24 CSET
25 } token;
26
27 static token tok;
28
29 static int
30 atom ()
31 {
32 if ((tok >= 0 && tok < (1 << 8 ) ) || tok >= CSET || tok == BACKREF
33 || tok == BEGLINE || tok == ENDLINE || tok == BEGWORD
34 || tok == ENDWORD || tok == LIMWORD || tok == NOTLIMWORD)
35 return 1;
36 else
37 return 0;
38 }
39
40 int
41 main (void)
42 {
43 tok = 0;
44 if (atom () != 1)
45 abort ();
46 exit (0);
47 }