summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-07 04:12:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-07 04:12:42 +0000
commitdb2d28b08e73a6f1698b578e53daaf230c3ce2bf (patch)
tree975b9713410e39f4d84b709fb13fada0fbe10f65
parent185133fd43ff4b41133b58834d20f3a699a2c260 (diff)
parse.y: fix for old compilers
* parse.y (arg_value): initialization of aggregation type with non-constant values is not allowed in C89. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 109c227e09..4279ea6e3a 100644
--- a/parse.y
+++ b/parse.y
@@ -4998,7 +4998,9 @@ assoc : arg_value tASSOC arg_value
| 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);