ruby-changes:48949
From: nobu <ko1@a...>
Date: Thu, 7 Dec 2017 13:12:47 +0900 (JST)
Subject: [ruby-changes:48949] nobu:r61068 (trunk): parse.y: fix for old compilers
nobu 2017-12-07 13:12:42 +0900 (Thu, 07 Dec 2017) New Revision: 61068 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61068 Log: parse.y: fix for old compilers * parse.y (arg_value): initialization of aggregation type with non-constant values is not allowed in C89. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61067) +++ parse.y (revision 61068) @@ -4998,7 +4998,9 @@ assoc : arg_value tASSOC arg_value https://github.com/ruby/ruby/blob/trunk/parse.y#L4998 | tSTRING_BEG string_contents tLABEL_END arg_value { /*%%%*/ - YYLTYPE location = {@1.first_loc, @3.last_loc}; + YYLTYPE location; + location.first_loc = @1.first_loc; + location.last_loc = @3.last_loc; $$ = list_append(new_list(dsym_node($2, &location), &location), $4, &@$); /*% $$ = dispatch2(assoc_new, dispatch1(dyna_symbol, $2), $4); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/