diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-02-11 11:13:32 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-02-11 11:13:32 +0000 |
commit | 78fbb514fc35ec8df761125ba7fd00773eb2842a (patch) | |
tree | 5f66d347e4d84a90453e74d97b66187492011de3 /util/romcc | |
parent | 184761864dcf515973bd514e8c35a5f06568f245 (diff) | |
download | coreboot-78fbb514fc35ec8df761125ba7fd00773eb2842a.tar.xz |
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
Diffstat (limited to 'util/romcc')
-rw-r--r-- | util/romcc/romcc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 71c33b0a1b..ff11058da4 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -10782,6 +10782,9 @@ static struct triple *string_constant(struct compile_state *state) if (str_len < 0) { error(state, 0, "negative string constant length"); } + /* ignore empty string tokens */ + if (strcmp("\"", str) == 0) + continue; end = str + str_len; ptr = buf; buf = xmalloc(type->elements + str_len + 1, "string_constant"); |