* zero based array with elementsize>1 fix

This commit is contained in:
peter 2005-01-31 16:15:04 +00:00
parent c0fc8e110f
commit 9cf82cd7f6

View File

@ -1338,6 +1338,13 @@ 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
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 end
else else
@ -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