Asm and CTFE

Alex Rønne Petersen xtzgzorex at gmail.com
Sat Nov 12 14:56:19 PST 2011


On 12-11-2011 23:51, bearophile wrote:
> Alex Rønne Petersen:
>
>> The problem is that DMD defines *all* version identifiers regardless of
>> whether CTFE is active. I guess it's just a matter of removing the
>> inline assembly identifiers when doing CTFE.
>
> Do you remember why the  __ctfe is a run-time variable instead of a more right compile-time constant/version? I remember that Walter was not able to define it as a compile-time constant. So I don't know if it is possible to remove the inline assembly identifiers when doing CTFE.
>
> Bye,
> bearophile

Not sure. But removing version identifiers when entering CTFE should be 
trivial; see src/mars.c for how they are added.

- Alex


More information about the Digitalmars-d-learn mailing list