# HG changeset patch # User Shinji KONO # Date 1396708928 -32400 # Node ID b519139c25e2fe580b029634b2cda287c1ed3198 # Parent 9a4b92984cf14a8a49e9e431110bf138a6ffa33e fix examples diff -r 9a4b92984cf1 -r b519139c25e2 mc-inline.c --- a/mc-inline.c Sat Apr 05 23:04:38 2014 +0900 +++ b/mc-inline.c Sat Apr 05 23:42:08 2014 +0900 @@ -896,6 +896,7 @@ if (init==0) { // empty declaration // it can happen like a = (struct hoge){}; + // offset = passign_data(var,EMPTY,list2(CONST,size(target_type)),EMPTY,offset); return offset; } e = cadr(init); diff -r 9a4b92984cf1 -r b519139c25e2 test/strinit.c --- a/test/strinit.c Sat Apr 05 23:04:38 2014 +0900 +++ b/test/strinit.c Sat Apr 05 23:42:08 2014 +0900 @@ -225,10 +225,17 @@ INLINE int main8() { struct arg a = {11,22,33}; struct arg b = {.fuga=44,.aho=55}; + struct arg c; + struct arg d = {}; + struct arg e = (struct arg){}; f(a); f(b); + f(c); + f(d); + f(e); f((struct arg){.fuga = 3,.aho=5}); f((struct arg){.hage = 3}); + f((struct arg){}); printf("#0226:%d %d\n",a.aho,((struct arg){.aho=120, .hage=55}).aho); return 0; }