ruby-changes:53816
From: k0kubun <ko1@a...>
Date: Tue, 27 Nov 2018 20:24:24 +0900 (JST)
Subject: [ruby-changes:53816] k0kubun:r66034 (trunk): regparse.c: conform C90
k0kubun 2018-11-27 20:24:19 +0900 (Tue, 27 Nov 2018) New Revision: 66034 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66034 Log: regparse.c: conform C90 ../regparse.c:5908:28: error: initializer for aggregate is not a compile-time constant [-Werror,-Wc99-extensions] Node* sequence[] = { np1, np2, np3, ((Node* )0) }; ^~~ https://travis-ci.org/ruby/ruby/jobs/460197620 Modified files: trunk/regparse.c Index: regparse.c =================================================================== --- regparse.c (revision 66033) +++ regparse.c (revision 66034) @@ -5905,7 +5905,10 @@ node_extended_grapheme_cluster(Node** np https://github.com/ruby/ruby/blob/trunk/regparse.c#L5905 if (r != 0) goto err; { /* poor man's varargs :-) */ - Node* sequence[] = { np1, np2, np3, NULL_NODE }; + Node* sequence[] = { NULL_NODE, NULL_NODE, NULL_NODE, NULL_NODE }; + sequence[0] = np1; + sequence[1] = np2; + sequence[2] = np3; create_sequence_node(&list2, sequence); np1 = np2 = np3 = NULL; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/