- cpp_error (pfile, CPP_DL_PEDWARN,
- "ISO C requires whitespace after the macro name");
+ {
+ /* While ISO C99 requires whitespace before replacement text
+ in a macro definition, ISO C90 with TC1 allows there characters
+ from the basic source character set. */
+ if (CPP_OPTION (pfile, c99))
+ cpp_error (pfile, CPP_DL_PEDWARN,
+ "ISO C99 requires whitespace after the macro name");
+ else
+ {
+ int warntype = CPP_DL_WARNING;
+ switch (ctoken->type)
+ {
+ case CPP_ATSIGN:
+ case CPP_AT_NAME:
+ case CPP_OBJC_STRING:
+ /* '@' is not in basic character set. */
+ warntype = CPP_DL_PEDWARN;
+ break;
+ case CPP_OTHER:
+ /* Basic character set sans letters, digits and _. */
+ if (strchr ("!\"#%&'()*+,-./:;<=>?[\\]^{|}~",
+ ctoken->val.str.text[0]) == NULL)
+ warntype = CPP_DL_PEDWARN;
+ break;
+ default:
+ /* All other tokens start with a character from basic
+ character set. */
+ break;
+ }
+ cpp_error (pfile, warntype,
+ "missing whitespace after the macro name");
+ }
+ }