romcc: Ignore empty string tokens. So far, romcc emitted a single double-quote for them.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5116 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
184761864d
commit
78fbb514fc
|
@ -10782,6 +10782,9 @@ static struct triple *string_constant(struct compile_state *state)
|
||||||
if (str_len < 0) {
|
if (str_len < 0) {
|
||||||
error(state, 0, "negative string constant length");
|
error(state, 0, "negative string constant length");
|
||||||
}
|
}
|
||||||
|
/* ignore empty string tokens */
|
||||||
|
if (strcmp("\"", str) == 0)
|
||||||
|
continue;
|
||||||
end = str + str_len;
|
end = str + str_len;
|
||||||
ptr = buf;
|
ptr = buf;
|
||||||
buf = xmalloc(type->elements + str_len + 1, "string_constant");
|
buf = xmalloc(type->elements + str_len + 1, "string_constant");
|
||||||
|
|
Loading…
Reference in New Issue