mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 13:10:28 +02:00
fcl-passrc: resolver: fixed reading constant $8000000000000000
git-svn-id: trunk@36927 -
This commit is contained in:
parent
0ddf135404
commit
92510ebe08
@ -2899,6 +2899,7 @@ begin
|
|||||||
writeln('TResExprEvaluator.EvalSetExpr Expr=',GetObjName(Expr),' length(ExprArray)=',length(ExprArray));
|
writeln('TResExprEvaluator.EvalSetExpr Expr=',GetObjName(Expr),' length(ExprArray)=',length(ExprArray));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result:=TResEvalSet.Create;
|
Result:=TResEvalSet.Create;
|
||||||
|
if Expr=nil then ;
|
||||||
Value:=nil;
|
Value:=nil;
|
||||||
OnlyConstElements:=true;
|
OnlyConstElements:=true;
|
||||||
ok:=false;
|
ok:=false;
|
||||||
@ -3375,9 +3376,12 @@ begin
|
|||||||
writeln('TResExprEvaluator.Eval Int=',Int,' Value="',TPrimitiveExpr(Expr).Value,'"');
|
writeln('TResExprEvaluator.Eval Int=',Int,' Value="',TPrimitiveExpr(Expr).Value,'"');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (Int<0) and (Pos('-',TPrimitiveExpr(Expr).Value)<1) then
|
if (Int<0) and (Pos('-',TPrimitiveExpr(Expr).Value)<1) then
|
||||||
RaiseInternalError(20170802141254,'bug in FPC str()');
|
// FPC str() converts $8000000000000000 to a negative int64 -> ignore
|
||||||
Result:=TResEvalInt.CreateValue(Int);
|
else
|
||||||
exit;
|
begin
|
||||||
|
Result:=TResEvalInt.CreateValue(Int);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
// try MaxPrecUInt
|
// try MaxPrecUInt
|
||||||
val(TPrimitiveExpr(Expr).Value,UInt,Code);
|
val(TPrimitiveExpr(Expr).Value,UInt,Code);
|
||||||
|
Loading…
Reference in New Issue
Block a user