+ arg computation order problem

This commit is contained in:
pierre 1999-04-20 08:32:46 +00:00
parent 4ce1d033fc
commit 749c615411
2 changed files with 33 additions and 2 deletions

25
bugs/bug0243.pp Normal file
View File

@ -0,0 +1,25 @@
program simpletest;
var i : longint;
function _next : longint;
begin
inc(i);
_next:=i;
end;
procedure test(a,b : longint);
begin
Writeln('first arg is ',a);
Writeln('second arg is ',b);
end;
begin
{ this could give
first arg is 1
second arg is 2
but FPC parses the second arg before the first one ! }
test(_next,_next);
writeln('third arg is ',_next);
writeln('fourth arg is ',_next,' fifth arg is ',_next);
end.

View File

@ -156,6 +156,10 @@ Fixed bugs:
bug0120.pp inc/dec(enumeration) doesn't work OK 0.99.6 (MVC)
bug0121.pp cardinal -> byte conversion not work (and crashes) OK 0.99.6 (FK)
bug0122.pp exit() gives a warning that the result is not set OK 0.99.6 (FK)
bug0123.pp Asm, problem with intel assembler (shrd) OK 0.99.11 (PM)
bug0124.pp Asm, problem with -Rintel switch and indexing
(whatever the order) fixed
variable must still be the first inside bracket OK 0.99.11 (PM)
bug0125.pp wrong colors with DOS CRT unit OK 0.99.6 (PFV)
bug0126.pp packed array isn't allowed OK 0.99.6 (FK)
bug0127.pp problem with cdecl in implementation part OK 0.99.7 (PFV)
@ -311,11 +315,11 @@ bug0193.pp overflow checking for 8 and 16 bit operations wrong
as all operations are done on 32 bit integers in FPC
overflow checking will only trap 32 bit overflow
you have to use range checks for byte or 16 bit integers
bug0124.pp Asm, problem with -Rintel switch and indexing (whatever the order)
Partial fix only see before
Unfixed bugs:
-------------
bug0123.pp Asm, problem with intel assembler (shrd)
bug0124.pp Asm, problem with -Rintel switch and indexing (whatever the order)
bug0226.pp Asm, offset of var is not allowed as constant
bug0228.pp Asm, wrong warning for size
@ -325,3 +329,5 @@ bug0232.pp const. procedure variables need a special syntax
if they use calling specification modifiers
bug0237.pp Can't have sub procedures with names defined in interface
bug0242.pp Crash when passing a procedure to formal parameter
bug0243.pp Arguments of functions are computed from right to left this
is against pascal convention