]> andersk Git - splint.git/blob - test/compoundliterals.c
noexpand always false.
[splint.git] / test / compoundliterals.c
1 /* Compound literals, added to C99 */
2 struct simple {
3   int a;
4   int b;
5 };
6
7 typedef struct simple simple_t;
8
9 int 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 0.042782 seconds and 5 git commands to generate.