attribute decl in version decl
    Timon Gehr 
    timon.gehr at gmx.ch
       
    Sun Sep 18 14:25:35 PDT 2011
    
    
  
On 09/18/2011 10:46 PM, Ellery Newcomer wrote:
> On 09/18/2011 01:02 PM, Timon Gehr wrote:
>>
>> If you are asking, if the D compiler is wrong here: No, it is by design,
>> you can check with the D grammar.
>
> Nah, just confirming that failure to apply the externs is a bug.
version(linux){
     extern(C):
} // affected declarations end here, because '}' is not a declaration.
ConditionalDeclarations don't work like the C preprocessor, the code is 
parsed before the ConditionalDeclaration is applied, not the other way 
round.
It would indeed be desirable to have it work like this, but it would be 
a special case.
    
    
More information about the Digitalmars-d-learn
mailing list