It would however be useful if the parser could generate a hint if a number argument is followed by text that is ignored. It seems like a reasonable assumption that a numeric expression would be valid in this context, so an indication to the contrary would be quite useful. I also thought that the original expression appear acceptable to the compiler. Good catch!
As I see it, there's four existing possibilities:
* A pragma (e.g. $endif) takes no parameters, anything unexpected is ignored.
* A pragma (e.g. $ifdef) takes a single parameter, non-parenthesised and non-quoted, with the handling of anything that follows undefined.
* A pragma (e.g. $if) takes a (whitespace-separated) expression that evaluates to a boolean up to the close of the comment.
* A pragma (e.g. $define) takes everything up to the close of the comment.
My preference would have been to add an explicit eval() for arithmetic expressions. However this (a) adds a fifth possibility and (b) is troubling if $define really does already evaluate a numeric expression as suggested by Thaddy.
The logical solution would be to add eval(), to require that both $if and $minstacksize etc. either took a single token or an eval(), and that $define reproduced the tokens that followed unchanged unless enclosed in an eval(), plus of course a way of escaping eval() so that $define output it unchanged.
That would, of course, be a breaking change to the $if pragma (which could be easily identified by the compiler). The devs have done far worse to us.
But as I've said: this is not my fight.
MarkMLl