From 8697d522756df0a3898eb6622529956377dcb7a8 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 14 Sep 2008 21:49:41 +0000 Subject: [PATCH] Handle the case when array access results in an address constant. [r21952] --- ast.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ast.c b/ast.c index a9f8554..1621bb2 100644 --- a/ast.c +++ b/ast.c @@ -1640,6 +1640,15 @@ bool is_address_constant(const expression_t *expression) return false; } + case EXPR_ARRAY_ACCESS: { + type_t *const type = + skip_typeref(revert_automatic_type_conversion(expression)); + return + is_type_array(type) && + is_constant_expression(expression->array_access.index) && + is_address_constant(expression->array_access.array_ref); + } + default: return false; } -- 2.20.1