Provide more informational errors when supplying the cpp option -Dname

where "name" is invalid, as requested by <woods@most.weird.com> in PR
bin/5767.
This commit is contained in:
tv 1998-09-15 00:22:02 +00:00
parent ff7d59c499
commit efa86546e9
2 changed files with 4 additions and 4 deletions

4
gnu/dist/gcc/cccp.c vendored
View File

@ -9890,7 +9890,7 @@ make_definition (str, op)
p = buf = (U_CHAR *) str;
if (!is_idstart[*p]) {
error ("malformed option `-D %s'", str);
error ("invalid macro name in option `-D %s'", str);
return;
}
while (is_idchar[*++p])
@ -9906,7 +9906,7 @@ make_definition (str, op)
strcpy ((char *)buf, str);
strcat ((char *)buf, " 1");
} else if (*p != '=') {
error ("malformed option `-D %s'", str);
error ("invalid macro name in option `-D %s'", str);
return;
} else {
U_CHAR *q;

View File

@ -529,7 +529,7 @@ cpp_define (pfile, str)
p = str;
if (!is_idstart[*p])
{
cpp_error (pfile, "malformed option `-D %s'", str);
cpp_error (pfile, "invalid macro name `%s'", str);
return;
}
while (is_idchar[*++p])
@ -542,7 +542,7 @@ cpp_define (pfile, str)
}
else if (*p != '=')
{
cpp_error (pfile, "malformed option `-D %s'", str);
cpp_error (pfile, "invalid macro name `%s'", str);
return;
}
else