aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-03-17 00:23:34 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-17 00:23:34 +0000
commit8483b70ebfc50f91a989ea4ca2d35b794c0802d1 (patch)
tree669ad93d4079292089bc7a74502f7114d018601e /util
parent8e96ba2978b622bb605caaeb07600c45516651c2 (diff)
downloadcoreboot-8483b70ebfc50f91a989ea4ca2d35b794c0802d1.tar.gz
coreboot-8483b70ebfc50f91a989ea4ca2d35b794c0802d1.tar.xz
coreboot-8483b70ebfc50f91a989ea4ca2d35b794c0802d1.zip
Catch non-static arrays in romcc. Not allowed.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5230 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/romcc/romcc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index b961d66c3..f00f93f32 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -13473,6 +13473,10 @@ static struct triple *do_decl(struct compile_state *state,
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)) {