* Commented out exponent check added in r25549: since this code is used by compiler, it breaks compilation of code with constants in extended range on targets without extended precision.

git-svn-id: trunk@25564 -
This commit is contained in:
sergei 2013-09-25 07:18:18 +00:00
parent be6d5ec663
commit a6d34945a2

View File

@ -1630,6 +1630,10 @@ begin
explimit:=explimit div 10; explimit:=explimit div 10;
while (length(s)>=code) and (s[code] in ['0'..'9']) do while (length(s)>=code) and (s[code] in ['0'..'9']) do
begin begin
{ Check commented out: since this code is used by compiler, it would error out
e.g. if compiling '1e3000' for non-x86 target. OTOH silently treating it
as infinity isn't a good option either. }
(*
if (exponent>explimit) or if (exponent>explimit) or
((exponent=explimit) and (ord(s[code])>explastdigit)) then ((exponent=explimit) and (ord(s[code])>explastdigit)) then
begin begin
@ -1637,7 +1641,7 @@ begin
if hd<>0.0 then if hd<>0.0 then
exit; exit;
end end
else else *)
exponent:=exponent*10+(ord(s[code])-ord('0')); exponent:=exponent*10+(ord(s[code])-ord('0'));
inc(code); inc(code);
end; end;