The compiler confuses offset keyword in the inline assembler with .offsetof property and issues a deprecated keyword error. This is easily reproduced by compiling the following: CODE: int[5] bar; void foo() { asm { mov ECX,offset bar; } } a workaround would be to do this: int[5] bar; void foo() { void* pbar = &bar; asm { mov ECX,pbar; } } after issuing the error it says to use offsetof instead, and when you write: int[5] bar; void foo() { asm { mov ECX,offsetof bar; } } it compiles and runs until a runtime error is issued.
Fixed DMD 0.161 (there was a bug in the offsetof implementation, but still offsetof is preferred to offset)
test cases: http://dstress.kuehne.cn/run/a/asm_offset_01_A.d http://dstress.kuehne.cn/nocompile/a/asm_offset_01_B.d
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル