vla_sizeof0(int size)1unsigned long vla_sizeof0(int size) 2 { 3 int a[size]; 4 return sizeof(a); 5 } 6 vla_sizeof1(int size)7unsigned long vla_sizeof1(int size) 8 { 9 struct s { 10 int a[size]; 11 }; 12 return sizeof(struct s); 13 } 14 vla_sizeof2(int size)15unsigned long vla_sizeof2(int size) 16 { 17 struct s { 18 int a[size]; 19 } *p; 20 return sizeof(*p); 21 } 22 vla_inc(int size,void * base)23void* vla_inc(int size, void *base) 24 { 25 struct s { 26 int a[size]; 27 } *p = base; 28 29 ++p; 30 return p; 31 } 32 33 /* 34 * check-name: vla-sizeof.c 35 * 36 * check-known-to-fail 37 */ 38