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.

Reply via email to