ruby-changes:49757
From: shyouhei <ko1@a...>
Date: Tue, 16 Jan 2018 18:21:13 +0900 (JST)
Subject: [ruby-changes:49757] shyouhei:r61875 (trunk): nested flexible array member is a GCCism
shyouhei 2018-01-16 18:21:07 +0900 (Tue, 16 Jan 2018) New Revision: 61875 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61875 Log: nested flexible array member is a GCCism This is NG. The ISO C section 6.7.2.1 explicitly states that structs having flexible array members "shall not be a member of a structure or an element of an array." Modified files: trunk/node.c Index: node.c =================================================================== --- node.c (revision 61874) +++ node.c (revision 61875) @@ -1042,7 +1042,7 @@ rb_node_init(NODE *n, enum node_type typ https://github.com/ruby/ruby/blob/trunk/node.c#L1042 typedef struct node_buffer_elem_struct { struct node_buffer_elem_struct *next; - NODE buf[FLEX_ARY_LEN]; + NODE buf[1]; } node_buffer_elem_t; struct node_buffer_struct { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/