[前][次][番号順一覧][スレッド一覧]

ruby-changes:48956

From: yui-knk <ko1@a...>
Date: Fri, 8 Dec 2017 09:45:28 +0900 (JST)
Subject: [ruby-changes:48956] yui-knk:r61075 (trunk): parse.y Fix compile error

yui-knk	2017-12-08 09:45:23 +0900 (Fri, 08 Dec 2017)

  New Revision: 61075

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61075

  Log:
    parse.y Fix compile error
    
    ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61074)
+++ parse.y	(revision 61075)
@@ -1453,10 +1453,11 @@ stmt		: keyword_alias fitem {SET_LEX_STA https://github.com/ruby/ruby/blob/trunk/parse.y#L1453
 		| stmt modifier_rescue stmt
 		    {
 		    /*%%%*/
+			NODE *resq;
 			YYLTYPE location;
 			location.first_loc = @2.first_loc;
 			location.last_loc = @3.last_loc;
-			NODE *resq = new_resbody(0, remove_begin($3), 0, &location);
+			resq = new_resbody(0, remove_begin($3), 0, &location);
 			$$ = new_rescue(remove_begin($1), resq, 0, &@$);
 		    /*%
 			$$ = dispatch2(rescue_mod, $1, $3);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]