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:
parent
ff7d59c499
commit
efa86546e9
4
gnu/dist/gcc/cccp.c
vendored
4
gnu/dist/gcc/cccp.c
vendored
@ -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;
|
||||
|
4
gnu/dist/gcc/cpplib.c
vendored
4
gnu/dist/gcc/cpplib.c
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user