mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-02 00:41:32 +00:00
Hexadecimal/octal constants 0x80000000+ should have type unsigned long.
They previously had type signed long (with negative values).
This commit is contained in:
parent
393fb8d635
commit
8ac887f4dc
|
@ -3337,7 +3337,7 @@ else if numString[1] <> '0' then begin {convert a decimal integer}
|
||||||
token.lval := Convertsl(numString);
|
token.lval := Convertsl(numString);
|
||||||
end; {else}
|
end; {else}
|
||||||
end {else if}
|
end {else if}
|
||||||
else begin {hex & octal}
|
else begin {hex, octal, & binary}
|
||||||
token.lval := 0;
|
token.lval := 0;
|
||||||
if isHex then begin
|
if isHex then begin
|
||||||
i := 3;
|
i := 3;
|
||||||
|
@ -3392,7 +3392,7 @@ else begin {hex & octal}
|
||||||
if long(token.lval).msw <> 0 then
|
if long(token.lval).msw <> 0 then
|
||||||
isLong := true;
|
isLong := true;
|
||||||
if isLong then begin
|
if isLong then begin
|
||||||
if unsigned then
|
if unsigned or (token.lval & $80000000 <> 0) then
|
||||||
token.kind := ulongConst
|
token.kind := ulongConst
|
||||||
else
|
else
|
||||||
token.kind := longConst;
|
token.kind := longConst;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user