The "problem" with {$ifdef} is that everything that comes after a legal identifier string consisting of the ' _', 0..9,'A..Z','a..z' is treated as a comment, so {$ifdef 5+1=true} resolves to 5 because +1=true is a comment.
The string is cut off at the first character or symbol that is not in that set.
In this case +.
OTOH {$if 5+1=6} resolves to true because {$if} allows expressions.
And there is where the whole discussion went wrong.
All this is documented. The compiler handles the options correctly but codetools doesn't.
Codetools should parse ' _', 0..9,'A..Z','a..z' correctly, which is basically the set for any valid pascal identifier char except the escape char &