...
Once this modification is made, the non-compliant code example no longer compiles because the macro expansion results in the conditional expression getchar() (-1)
, which is no longer syntactically valid. Note that there must be a space after EOF
because otherwise it becomes a function-like macro (and one that is incorrectly formed, since because -1 cannot be a formal parameter).
...
In this compliant solution, we replace the macro definition is replaced with an enumeration constant in compliance with DCL00-A. Const-qualify immutable objects.
...