[coreboot] New patch to review for coreboot: a9f0bff romcc: Don't fail on function prototypes

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Sat Feb 16 20:17:44 CET 2013

Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2424


commit a9f0bffe1c97fe0285c3780ccd0886078705ef9c
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sat Feb 16 20:16:34 2013 +0100

    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 at georgi-clan.de>
 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 15e950c..d371506 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) &&

More information about the coreboot mailing list