summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2013-02-16 20:16:34 +0100
committerPatrick Georgi <patrick@georgi-clan.de>2013-02-19 11:01:05 +0100
commit11a7db3b570eb07759a7f4b5d8397be87518388d (patch)
treea9aed8f0e186b7f8e5f8286d379268ef99f8d76c /util
parent70c85eab83564a9a5533afa16d4aa95416fb4424 (diff)
romcc: Don't fail on function prototypes
Instead, ignore them. One is as non-standard as the other and ignoring is more convenient since we don't need to guard prototypes with #ifndef __ROMCC_ all the time. Change-Id: I7be93a2ed0966ba1a86f0294132a204e6c8bf24f Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/2424 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martin.roth@se-eng.com> Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'util')
-rw-r--r--util/romcc/romcc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index 15e950cc67..d371506ec1 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -13465,7 +13465,8 @@ static struct triple *do_decl(struct compile_state *state,
internal_error(state, 0, "Undefined storage class");
}
if ((type->type & TYPE_MASK) == TYPE_FUNCTION) {
- error(state, 0, "Function prototypes not supported");
+ // ignore function prototypes
+ return def;
}
if (ident &&
((type->type & TYPE_MASK) == TYPE_ARRAY) &&