1/*
2 * Copyright 2014, NICTA
3 *
4 * This software may be distributed and modified according to the terms of
5 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
6 * See "LICENSE_BSD2.txt" for details.
7 *
8 * @TAG(NICTA_BSD)
9 */
10
11/* from ISO/IEC 9899:1999 */
12
13enum hue {chartreuse, burgundy, claret = 20, winedark };
14
15int f(enum hue *cp)
16{
17  enum hue col;
18  int array[claret];
19  col = claret;
20  array[6] = chartreuse;
21  if (*cp != burgundy) return 1;
22  else return 2;
23}
24
25enum foo {bar,baz} x;
26int g(void)
27{
28  x = bar;
29  return x;
30}
31
32int h(void)
33{
34  int array[100] = {[claret] = 10};
35  return array[winedark];
36}
37
38
39enum ts20091113 {foo = -10, bar2, baz2 = -60, qux = 1, quux};
40