Conditional compilation inside asm and enum declarations

Daniel Keep daniel.keep.lists at gmail.com
Wed Jul 15 03:24:47 PDT 2009


Tomas Lindquist Olsen wrote:
> On Wed, Jul 15, 2009 at 2:18 AM, Walter
> Bright<newshound1 at digitalmars.com> wrote:
>> Don wrote:
>>> In this case you may have a long function, with only a single instruction
>>> right in the middle which needs to be changed.
>> void foo()
>> {
>>    asm
>>    {
>>        mov EAX,EAX;
>>        ... lots more instructions ...
>>    }
>>    version (bar) asm
>>    {
>>        mov EAX,EAX;
>>    }
>>    asm
>>    {
>>        ... even more instructions ...
>>        mov EAX,EAX;
>>    }
>> }
>>
> 
> 
> Since when does D guarantee that no code is inserted before/after asm blocks?

I think it was around the time that the mail service guaranteed that
they wouldn't leave a dead cat in your mailbox on every alternate Wednesday.



More information about the Digitalmars-d mailing list