Compiler stack overflow on recursive typeof in function declaration: -------- void test( typeof(test) p) { } ---- Should give the error that test.p cannot be declared to be a function.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail@puremagic.com schrieb am 2006年09月26日: > http://d.puremagic.com/issues/show_bug.cgi?id=370 > Compiler stack overflow on recursive typeof in function declaration: > -------- > void test( typeof(test) p) { } > ---- > Should give the error that test.p cannot be declared to be a function. Added to DStress as http://dstress.kuehne.cn/dstress/compile/t/typeof_11_A.d http://dstress.kuehne.cn/dstress/nocompile/t/typeof_11_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFHNwdLK5blCcjpWoRAjGOAKCVSd+aHD5hPb7Z4Kx3FDmnQN3/lwCgqihE ZtpKXj4m4YZg9mMNrO1m23s= =eF9n -----END PGP SIGNATURE-----
Fixed DMD 0.168
The DStress cases are failing again with dmd 1.051. % dmd nocompile/t/typeof_11_B.d nocompile/t/typeof_11_B.d(14): Error: forward reference to test dmd: mtype.c:3674: virtual void TypeTypeof::toDecoBuffer(OutBuffer*): Assertion `0' failed. zsh: abort dmd nocompile/t/typeof_11_B.d
The regression occurred in DMD1.047. It worked fine in 1.046.
This is caused by the addition of void TypeTypeof::toDecoBuffer(OutBuffer *buf) { assert(0); } to mtype.c. This was added in DMD1.047, but wasn't added to D2, so D2 doesn't ICE. PATCH: Just change the assert into an error message, eg: error(loc, "invalid typeof expression");
Fixed dmd 1.053
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル