(create_definition): Error if comma not followed by an
identifier.
(collect_expansion): Error if # used in macro with no arguments.
From-SVN: r8567
if (*bp == ',') {
bp++;
SKIP_WHITE_SPACE (bp);
+ /* A comma at this point can only be followed by an identifier. */
+ if (!is_idstart[*bp]) {
+ error ("badly punctuated parameter list in `#define'");
+ goto nope;
+ }
}
if (bp >= limit) {
error ("unterminated parameter list in `#define'");
Don't leave the # in the expansion. */
exp_p--;
SKIP_WHITE_SPACE (p);
- if (p == limit || ! is_idstart[*p])
+ if (p == limit || ! is_idstart[*p] || nargs == 0)
error ("`#' operator is not followed by a macro argument name");
else
stringify = p;