Author: stepan Date: Wed Mar 17 01:23:34 2010 New Revision: 5230 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5230
Log: Catch non-static arrays in romcc. Not allowed.
Signed-off-by: Eric W. Biederman ebiederm@xmission.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/util/romcc/romcc.c
Modified: trunk/util/romcc/romcc.c ============================================================================== --- trunk/util/romcc/romcc.c Wed Mar 17 00:33:29 2010 (r5229) +++ trunk/util/romcc/romcc.c Wed Mar 17 01:23:34 2010 (r5230) @@ -13473,6 +13473,10 @@ if ((type->type & TYPE_MASK) == TYPE_FUNCTION) { error(state, 0, "Function prototypes not supported"); } + if (ident && + ((type->type & TYPE_MASK) == TYPE_ARRAY) && + ((type->type & STOR_MASK) != STOR_STATIC)) + error(state, 0, "non static arrays not supported"); if (ident && ((type->type & STOR_MASK) == STOR_STATIC) && ((type->type & QUAL_CONST) == 0)) {