When a 'pragma(msg, ...)' pragma has a missing comma, the subsequent pragma(msg, ...) will result in a segfault. ------ template A(B) { pragma(msg, B) // <-- missing ';' enum A = 0; } enum a = A!int; pragma(msg, 0); ------ The error exists at least since 2.042 http://ideone.com/MVgnG, and still persists in 2.052. The segfault is raised in 'ExpInitializer::semantic' in 'init.c': Initializer *ExpInitializer::semantic(Scope *sc, Type *t) { //printf(".... exp = exp->semantic(sc); exp = resolveProperties(sc, exp); exp = exp->optimize(WANTvalue | WANTinterpret); Type *tb = t->toBasetype(); // <-- this line
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ac69d4b9893725d0eb7f40002f73d0b280214b02 Merge pull request #665 from donc/ice5796 ICE bugs 5796 and 6720
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/06b3b85c8f4e069d8a9a6224d155047ba83413c9 fix Issue 5796 - ICE with pragma(msg, ...) after missing ';' in a template
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル