From 11a7db3b570eb07759a7f4b5d8397be87518388d Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 16 Feb 2013 20:16:34 +0100 Subject: 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 Reviewed-on: http://review.coreboot.org/2424 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Marc Jones --- util/romcc/romcc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) && -- cgit v1.2.3