]> andersk Git - splint.git/blame - test/compoundliterals.c
noexpand always false.
[splint.git] / test / compoundliterals.c
CommitLineData
16d40061 1/* Compound literals, added to C99 */
2struct simple {
3 int a;
4 int b;
5};
6
7typedef struct simple simple_t;
8
9int main (/*@unused@*/ int argc, /*@unused@*/ char **argv) {
10 /* This works */
11 struct simple simple1 = {1,2};
12 /* These don't */
13 struct simple simple2 = (struct simple){1,2};
14 simple_t simple3 = (((((((simple_t){1,2}))))));
15 simple2 = (struct simple) { 1, 2 };
16 printf("%d, %d\n", simple1.a, simple1.b);
17 printf("%d, %d\n", simple2.a, simple2.b);
18 printf("%d, %d\n", simple3.a, simple3.b);
19 return 1;
20}
This page took 1.880541 seconds and 5 git commands to generate.