The bug is that it doesn't check that the number of members in the initializer is correct. It's silently accepted as long as you don't access an uninitialised member; if you do, the compiler segfaults. ---- struct Test{ int foo; } enum Test test = {}; enum q = test.foo;
Fixed in DMD2.030, NOT FIXED in DMD1.045. struct Test{ int foo; } const Test test = {}; const q = test.foo;
Fixed dmd 2.030
Re-opened because DMD 1.045 segfaults.
Seems like this was just missed in copying from D2 to D1. Segfaulting in StructLiteralExp::getFieldIndex() in expression.c. PATCH: Just copy int StructLiteralExp::getFieldIndex(Type *type, unsigned offset) (line 3197) from D2 to D1. (Needs if(elements->dim){ ... } around the for loop).
Fixed dmd 1.049
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル