Skip to content

Commit

Permalink
- Fixed code generation for enumeration subscripts.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16002 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed May 8, 2013
1 parent 27c95af commit e355280
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Compiler/Template/CodegenC.tpl
Expand Up @@ -3283,6 +3283,7 @@ template subscriptToCStr(Subscript subscript)
::=
match subscript
case INDEX(exp=ICONST(integer=i)) then i
case INDEX(exp=ENUM_LITERAL(index=i)) then i
case SLICE(exp=ICONST(integer=i)) then i
case WHOLEDIM(__) then "WHOLEDIM"
else "UNKNOWN_SUBSCRIPT"
Expand Down Expand Up @@ -3322,6 +3323,7 @@ template subscriptToMStr(Subscript subscript)
let &varDecls = buffer ""
match subscript
case INDEX(exp=ICONST(integer=i)) then i
case INDEX(exp=ENUM_LITERAL(index=i)) then i
case SLICE(exp=ICONST(integer=i)) then i
case WHOLEDIM(__) then "WHOLEDIM"
else "UNKNOWN_SUBSCRIPT"
Expand Down

0 comments on commit e355280

Please sign in to comment.