projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4a8e83
)
Handle the case when array access results in an address constant.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 14 Sep 2008 21:49:41 +0000
(21:49 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 14 Sep 2008 21:49:41 +0000
(21:49 +0000)
[r21952]
ast.c
patch
|
blob
|
history
diff --git
a/ast.c
b/ast.c
index
a9f8554
..
1621bb2
100644
(file)
--- 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;
}