Add long long support for a couple lint checks.

This commit is contained in:
Stephen Heumann 2021-02-04 17:53:37 -06:00
parent d2fb8cc27e
commit fc3bd32e65

View File

@ -2828,7 +2828,8 @@ var
begin {CheckDivByZero}
if opType^.kind = scalarType then
if opType^.baseType in [cgByte,cgWord,cgUByte,cgUWord,cgLong,cgULong] then
if opType^.baseType in
[cgByte,cgWord,cgUByte,cgUWord,cgLong,cgULong,cgQuad,cgUQuad] then
if ((divisor.class = intConstant) and (divisor.ival = 0))
or ((divisor.class = longConstant) and (divisor.lval = 0))
or ((divisor.class = longlongConstant)
@ -2870,6 +2871,9 @@ var
if opType^.baseType in [cgLong,cgULong] then
if (shiftCount < 0) or (shiftCount > 31) then
Error(130);
if opType^.baseType in [cgQuad,cgUQuad] then
if (shiftCount < 0) or (shiftCount > 63) then
Error(130);
end; {if}
end; {CheckShiftOverflow}