# HG changeset patch # User kono # Date 1131451446 -32400 # Node ID 33735a212eff2ac5bcc973aef501ef4599fd1ea0 # Parent f8ba383dbc399f94870922fddebad232c20a0dce single struct argument goto fix. diff -r f8ba383dbc39 -r 33735a212eff Changes --- a/Changes Tue Nov 08 16:55:51 2005 +0900 +++ b/Changes Tue Nov 08 21:04:06 2005 +0900 @@ -7232,4 +7232,7 @@ $4 が使われていると $f12 は使わずに $5 を使うという方針のようですね。 - +Tue Nov 8 20:20:29 JST 2005 + +構造体の局所変数の初期化に式を書けない。全部、定数かどうかをチェックする必要あり。 + diff -r f8ba383dbc39 -r 33735a212eff mc-parse.c --- a/mc-parse.c Tue Nov 08 16:55:51 2005 +0900 +++ b/mc-parse.c Tue Nov 08 21:04:06 2005 +0900 @@ -1298,6 +1298,8 @@ if (mode==LDECL && LOCAL_STRUCT_INIT_STATIC) { // uninitialized part should be 0. // local var init cannot postponed because of assign_expr0/type + // if initialization contains expressions, + // we cannot do it in STADECL nptr0=new_static_name("__lstruct",'_'); nptr0->next = local_static_list; local_static_list = nptr0; nptr0->sc = GVAR; @@ -3397,8 +3399,10 @@ } checksym(RPAR); conv->funcall_args_(); - if(t<0 && t==CODE) + if(t<0 && t==CODE) { + type = ftype; return list4(FUNCTION,e1,arglist,ftype); + } /* return type */