Mercurial > hg > CbC > old > device
changeset 474:33735a212eff
single struct argument goto fix.
author | kono |
---|---|
date | Tue, 08 Nov 2005 21:04:06 +0900 |
parents | f8ba383dbc39 |
children | ec4046c9d34f |
files | Changes mc-parse.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 + +構造体の局所変数の初期化に式を書けない。全部、定数かどうかをチェックする必要あり。 +
--- 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 */