Skip to content

Commit

Permalink
- set the type of T_UNKNOWN to "complex" (void*) when +g=MetaModelica…
Browse files Browse the repository at this point in the history
… and to "real" (modelica_real) when not.

- have the type of the inStream operator to be T_REAL_DEFAULT as T_UNKONW reaches the code somehow.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13949 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 18, 2012
1 parent 0794b97 commit bfcaaaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/ConnectUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2976,7 +2976,7 @@ protected function makeInStreamCall
annotation(__OpenModelica_EarlyInline = true);
algorithm
outInStreamCall := DAE.CALL(Absyn.IDENT("inStream"), {inStreamExp},
DAE.CALL_ATTR(DAE.T_UNKNOWN_DEFAULT, false, false, DAE.NO_INLINE(), DAE.NO_TAIL()));
DAE.CALL_ATTR(DAE.T_REAL_DEFAULT, false, false, DAE.NO_INLINE(), DAE.NO_TAIL()));
end makeInStreamCall;

protected function makePositiveMaxCall
Expand Down
4 changes: 3 additions & 1 deletion Compiler/Template/CodegenC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7888,7 +7888,9 @@ template expTypeShort(DAE.Type type)
case T_COMPLEX(__) then 'struct <%underscorePath(ClassInf.getStateName(complexClassType))%>'
case T_METATYPE(__) case T_METABOXED(__) then "metatype"
case T_FUNCTION_REFERENCE_VAR(__) then "fnptr"
case T_UNKNOWN(__) then "real /* assumming real for uknown type! */" /* TODO: Don't do this to me! */
case T_UNKNOWN(__) then if acceptMetaModelicaGrammar() /* TODO: Don't do this to me! */
then "complex /* assumming void* for uknown type! when +g=MetaModelica */ "
else "real /* assumming real for uknown type! */"
case T_ANYTYPE(__) then "complex" /* TODO: Don't do this to me! */
else error(sourceInfo(),'expTypeShort:<%unparseType(type)%>')
end expTypeShort;
Expand Down

0 comments on commit bfcaaaa

Please sign in to comment.