mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
Allow static evaluation of ? : expressions with long long operands.
This commit is contained in:
parent
75c7cd95d3
commit
58f2ebddec
@ -1101,13 +1101,14 @@ var
|
||||
op^.right := Pop;
|
||||
op^.middle := Pop;
|
||||
op^.left := Pop;
|
||||
if op^.right^.token.kind in
|
||||
[intconst,uintconst,longconst,ulongconst] then
|
||||
if op^.left^.token.kind in
|
||||
[intconst,uintconst,longconst,ulongconst] then
|
||||
if op^.middle^.token.kind in
|
||||
[intconst,uintconst,longconst,ulongconst] then begin
|
||||
if IntVal(op^.left^.token) <> 0 then
|
||||
if op^.right^.token.kind in [intconst,uintconst,
|
||||
longconst,ulongconst,longlongconst,ulonglongconst] then
|
||||
if op^.left^.token.kind in [intconst,uintconst,
|
||||
longconst,ulongconst,longlongconst,ulonglongconst] then
|
||||
if op^.middle^.token.kind in [intconst,uintconst,
|
||||
longconst,ulongconst,longlongconst,ulonglongconst] then begin
|
||||
GetLongLongVal(llop1, op^.left^.token);
|
||||
if (llop1.lo <> 0) or (llop1.hi <> 0) then
|
||||
op^.token := op^.middle^.token
|
||||
else
|
||||
op^.token := op^.right^.token;
|
||||
|
Loading…
Reference in New Issue
Block a user