Skip to content

Commit 32b6124

Browse files
committed
Fix type renaming of array types with non-constant size
1 parent 9c2b02f commit 32b6124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ansi-c/type2name.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ static std::string type2name(
187187
{
188188
const array_typet &t=to_array_type(type);
189189
mp_integer size;
190-
if(to_integer(t.size(), size))
191-
result+="ARR?";
192-
else if(t.size().id()==ID_symbol)
190+
if(t.size().id()==ID_symbol)
193191
result+="ARR"+t.size().get_string(ID_identifier);
192+
else if(to_integer(t.size(), size))
193+
result+="ARR?";
194194
else
195195
result+="ARR"+integer2string(size);
196196
}

0 commit comments

Comments
 (0)