Report errors in a few cases where the codegen finds unexpected types.
This makes it more likely that unsupported ops on long long or any other types added in the future will give an error rather than silently generating bad code. Also, update a comment.
This commit is contained in:
parent
f41cd241f8
commit
c48811add6
|
@ -421,9 +421,10 @@
|
|||
{ }
|
||||
{ Gen1t(pc_ldc, val, type) }
|
||||
{ GenLdcLong(val) }
|
||||
{ GenLdcQuad(val) }
|
||||
{ GenLdcReal(val) }
|
||||
{ }
|
||||
{ Loads a constant value. Special calls for long and real }
|
||||
{ Loads a constant value. Special calls for long, quad & real }
|
||||
{ values are provided due to the unique parameter requirements.}
|
||||
{ }
|
||||
{ }
|
||||
|
|
12
Gen.pas
12
Gen.pas
|
@ -2461,7 +2461,9 @@ else if op^.optype in [cgLong,cgULong] then begin
|
|||
end; {else}
|
||||
end; {else}
|
||||
end; {else}
|
||||
end; {else if}
|
||||
end {else if}
|
||||
else
|
||||
Error(cge1);
|
||||
end; {GenIncDec}
|
||||
|
||||
|
||||
|
@ -2682,7 +2684,7 @@ case optype of
|
|||
end; {if}
|
||||
end; {case cgByte,cgUByte,cgWord,cgUWord}
|
||||
|
||||
otherwise: ;
|
||||
otherwise: Error(cge1);
|
||||
end; {case}
|
||||
end; {GenInd}
|
||||
|
||||
|
@ -4252,7 +4254,7 @@ case optype of
|
|||
end; {else}
|
||||
end;
|
||||
|
||||
otherwise: ;
|
||||
otherwise: Error(cge1);
|
||||
|
||||
end; {case}
|
||||
end; {GenStrCop}
|
||||
|
@ -5691,7 +5693,9 @@ procedure GenTree {op: icptr};
|
|||
if isIncLoad then
|
||||
skipLoad := false;
|
||||
case op^.optype of {do the pop}
|
||||
otherwise: ;
|
||||
otherwise: Error(cge1);
|
||||
|
||||
cgByte, cgUByte, cgWord, cgUWord, cgVoid: ;
|
||||
|
||||
cgLong, cgULong:
|
||||
if not isIncLoad then
|
||||
|
|
Loading…
Reference in New Issue