Skip to content

Commit

Permalink
- Fixed IntegerLiterals32.mo on OMDev
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6058 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 8, 2010
1 parent 878d7a4 commit d73a40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Parser/Modelica.g
Expand Up @@ -910,13 +910,13 @@ primary returns [void* ast] @declarations {
if (errno || *endptr != 0) {
errno = 0;
double d = strtod(chars,&endptr);
modelicaParserAssert(*endptr != 0 && !errno, "Number is too large to represent as a long or double on this machine", primary, $start->line, $start->charPosition+1, LT(1)->line, LT(1)->charPosition+1);
modelicaParserAssert(*endptr == 0 && errno==0, "Number is too large to represent as a long or double on this machine", primary, $start->line, $start->charPosition+1, LT(1)->line, LT(1)->charPosition+1);
c_add_source_message(2, "SYNTAX", "Warning", "\%s-bit signed integers! Transforming: \%s into a real",
args, 2, $start->line, $start->charPosition+1, LT(1)->line, LT(1)->charPosition+1,
ModelicaParser_readonly, ModelicaParser_filename_C);
$ast = Absyn__REAL(mk_rcon(d));
} else {
if (((long)1<<(RML_SIZE_INT*8-2))-1 > l) {
if (((long)1<<(RML_SIZE_INT*8-2))-1 >= l) {
$ast = Absyn__INTEGER(RML_IMMEDIATE(RML_TAGFIXNUM(l))); /* We can't use mk_icon here - it takes "int"; not "long" */
} else {
if (l > ((long)1<<30)-1) {
Expand Down

0 comments on commit d73a40e

Please sign in to comment.