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 11extern int x; 12 13extern int array[]; 14 15int x; 16 17int f(void) 18{ 19 return x + 1; 20} 21 22int *g(void) 23{ 24 return &x; 25} 26 27int array[40]; 28 29int index(int i) 30{ 31 if (0 <= i && i < 40) return array[i]; 32 else return -1; 33} 34 35int update(int i, int value) 36{ 37 array[i] = value; 38} 39 40enum { FOO = 30 }; 41 42extern int array2[]; 43 44int h(int i) 45{ 46 return array2[i]; 47} 48 49int array2[FOO / 2]; 50 51 52 53 54 55