From 2bfbec874518d5efd5baf4381af7c47b78775c23 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 20 Oct 2018 11:06:05 +0000 Subject: [PATCH] parse.y: Fix the compile error * parse.y: Fix "error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parse.y b/parse.y index 9c1911d640..ad67045d33 100644 --- a/parse.y +++ b/parse.y @@ -3132,10 +3132,12 @@ lambda : { p->lex.lpar_beg = $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, $1);