mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 15:29:11 +02:00
* zero based array with elementsize>1 fix
This commit is contained in:
parent
c0fc8e110f
commit
9cf82cd7f6
@ -1338,7 +1338,14 @@ implementation
|
|||||||
begin
|
begin
|
||||||
right:=caddnode.create(muln,right,
|
right:=caddnode.create(muln,right,
|
||||||
cordconstnode.create(tpointerdef(ld).pointertype.def.size,sinttype,true));
|
cordconstnode.create(tpointerdef(ld).pointertype.def.size,sinttype,true));
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
if is_zero_based_array(ld) and
|
||||||
|
(tarraydef(ld).elementtype.def.size>1) then
|
||||||
|
begin
|
||||||
|
right:=caddnode.create(muln,right,
|
||||||
|
cordconstnode.create(tarraydef(ld).elementtype.def.size,sinttype,true));
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
|
CGMessage3(type_e_operator_not_supported_for_types,node2opstr(nodetype),ld.typename,rd.typename);
|
||||||
@ -2130,7 +2137,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.137 2005-01-26 16:23:28 peter
|
Revision 1.138 2005-01-31 16:15:04 peter
|
||||||
|
* zero based array with elementsize>1 fix
|
||||||
|
|
||||||
|
Revision 1.137 2005/01/26 16:23:28 peter
|
||||||
* detect arithmetic overflows for constants at compile time
|
* detect arithmetic overflows for constants at compile time
|
||||||
* use try..except instead of setjmp
|
* use try..except instead of setjmp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user