projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47b73b8
)
Remove wrong test from is_string_type(): Pointers are not string types.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 13 Jun 2012 14:05:46 +0000
(16:05 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 14 Jun 2012 08:38:11 +0000
(10:38 +0200)
ast2firm.c
patch
|
blob
|
history
diff --git
a/ast2firm.c
b/ast2firm.c
index
c85a8a1
..
9b88760
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-3782,15
+3782,10
@@
static ir_initializer_t *create_ir_initializer_value(
/** test wether type can be initialized by a string constant */
static bool is_string_type(type_t *type)
{
- type_t *inner;
- if (is_type_pointer(type)) {
- inner = skip_typeref(type->pointer.points_to);
- } else if(is_type_array(type)) {
- inner = skip_typeref(type->array.element_type);
- } else {
+ if (!is_type_array(type))
return false;
- }
+ type_t *const inner = skip_typeref(type->array.element_type);
return is_type_integer(inner);
}