Skip to content

Commit

Permalink
- Fix integer overflow problem warning on 32-bit systems
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6048 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 8, 2010
1 parent 00ba3ab commit da13ec0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Parser/Modelica.g
Expand Up @@ -898,7 +898,10 @@ primary returns [void* ast] :
char* endptr;
errno = 0;
long l = strtol(chars,&endptr,10);
const char* args[2] = {chars, RML_SIZE_INT == 8 ? "OpenModelica (64-bit) only supports 63" : l > ((long)1<<31)-1 ? "Modelica only supports 32" : "OpenModelica only supports 31"};
const char* args[2] = {chars,
RML_SIZE_INT == 8 ? "OpenModelica (64-bit) only supports 63"
: errno || *endptr != 0 ? "Modelica only supports 32"
: "OpenModelica only supports 31"};
if (errno || *endptr != 0) {
errno = 0;
Expand Down

0 comments on commit da13ec0

Please sign in to comment.