Hi Doug,
the reason why the compiler does not accept
#errror this 'test'
is because it treats everything after the #error as 'preprocessing' tokens.
If you double quote things after the #error, then it is a 'string' and you can have in it whatever is legal for a typical string in the C language.
If you do not double quote it, it get's a little bit tricky as your example contains single quotes. Typically, with single quotes you specify character constants like 'a'.
Now in your case the compiler rejects it because he does not accept a character constant with more than one character in it.
Checking the standard (ANSI/ISO 9899-1990) on this, in fact the standard would allow multi-character constants like 'test', but it says:
"The value of an integer character constant containing more than one character, or ....., is implementation defined."
So from this perspective, I would say that the compiler is consistent with the standard, but I would expect that the compiler would accept a character constant with more than one character in it (actually it accepts escape sequences and trigraphs in it).
But you still would run into problems if you would just use a single quote like
#error don't do this
I recommend that it would be the easiest thing for you if you double quote the message for the #error directive.
Erich