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 11struct s { 12 int fld; 13 struct t *ptr; 14}; 15 16typedef struct s foo; 17 18enum { MAX_T = 100 }; 19 20struct t { 21 foo eek[MAX_T]; 22 int valid; 23}; 24 25foo global; 26 27foo mk_foo(int i) 28{ 29 return (foo){.fld = i, .ptr = 0}; 30} 31 32 33