ruby-changes:53015
From: yui-knk <ko1@a...>
Date: Sat, 20 Oct 2018 20:06:10 +0900 (JST)
Subject: [ruby-changes:53015] yui-knk:r65229 (trunk): parse.y: Fix the compile error
yui-knk 2018-10-20 20:06:05 +0900 (Sat, 20 Oct 2018) New Revision: 65229 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65229 Log: parse.y: Fix the compile error * parse.y: Fix "error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]" Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 65228) +++ parse.y (revision 65229) @@ -3132,10 +3132,12 @@ lambda : { https://github.com/ruby/ruby/blob/trunk/parse.y#L3132 p->lex.lpar_beg = $<num>2; CMDARG_POP(); /*%%%*/ - YYLTYPE loc = code_loc_gen(&@3, &@5); - $$ = NEW_LAMBDA($3, $5, &loc); - nd_set_line($$->nd_body, @5.end_pos.lineno); - nd_set_line($$, @3.end_pos.lineno); + { + YYLTYPE loc = code_loc_gen(&@3, &@5); + $$ = NEW_LAMBDA($3, $5, &loc); + nd_set_line($$->nd_body, @5.end_pos.lineno); + nd_set_line($$, @3.end_pos.lineno); + } /*% %*/ /*% ripper: lambda!($3, $5) %*/ dyna_pop(p, $<vars>1); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/