This code always worked: struct X { union { void[] a; void[9] b; } } However, if you remove the union (so that a, b are direct struct members), it stops working and outputs "Error: integral constant must be scalar type, not void" (without line number information!). It also stops compiling if you remove the "a" member. It also generates a wrong .sizeof for the struct (12 instead of 9*4). Not sure what exactly is going on.
Never mind that bit about the struct's size, b is 9 bytes, aligned on 4 = 12 bytes. Correct.
Note that this compiles on v2.046, but it stops compiling if you remove the =void, so that problem can be by design: void main() { void[1] a = void; }
improved error message with changeset 496
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル