|
@@ -3472,7 +3472,7 @@ implementation
|
|
because it's too complex to handle correctly otherwise }
|
|
because it's too complex to handle correctly otherwise }
|
|
{$ifndef jvm}
|
|
{$ifndef jvm}
|
|
{ enums are class instances in the JVM -> always need conversion }
|
|
{ enums are class instances in the JVM -> always need conversion }
|
|
- if ([cs_check_overflow,cs_check_range]*current_settings.localswitches)<>[] then
|
|
|
|
|
|
+ if (([cs_check_overflow,cs_check_range]*current_settings.localswitches)<>[]) and not(nf_internal in flags) then
|
|
{$endif}
|
|
{$endif}
|
|
begin
|
|
begin
|
|
{ create constant 1 }
|
|
{ create constant 1 }
|
|
@@ -3491,6 +3491,11 @@ implementation
|
|
else
|
|
else
|
|
hp:=caddnode.create(subn,left,hp);
|
|
hp:=caddnode.create(subn,left,hp);
|
|
|
|
|
|
|
|
+ { the condition above is not tested for jvm, so we need to avoid overflow checks here
|
|
|
|
+ by setting nf_internal for the add/sub node as well }
|
|
|
|
+ if nf_internal in flags then
|
|
|
|
+ include(hp.flags,nf_internal);
|
|
|
|
+
|
|
{ assign result of addition }
|
|
{ assign result of addition }
|
|
if not(is_integer(resultdef)) then
|
|
if not(is_integer(resultdef)) then
|
|
inserttypeconv(hp,corddef.create(
|
|
inserttypeconv(hp,corddef.create(
|