Alfredo Cesar Fontana wrote:
Hello:
In this example:
PROGRAM STR; {$IFDEF BAD} TYPE P=PROCEDURE(S:STRING); {$ENDIF} VAR S:STRING; BEGIN S:='123'; DELETE(S,1,1); WRITELN(S) END.
with GPC v 19990118 (DJGPP and Linux) and GPC v 19990609
when I "gpc -o str str.pas" I get: "23", the delete procedure works fine. But if I "gpc -o str str.pas -DBAD" then I get: "123". I lost my delete procedure :'-(
Thanks for the report, I'm adding it to the To-Do list and testsuite (fontana1.pas).
I've traced the problem to parse.y:2196, but I can't fix it because there are strange things going on in that area which I don't understand.
Frank
Frank Heckenbach wrote:
Alfredo Cesar Fontana wrote:
Hello:
In this example:
PROGRAM STR; {$IFDEF BAD} TYPE P=PROCEDURE(S:STRING); {$ENDIF} VAR S:STRING; BEGIN S:='123'; DELETE(S,1,1); WRITELN(S) END.
with GPC v 19990118 (DJGPP and Linux) and GPC v 19990609
when I "gpc -o str str.pas" I get: "23", the delete procedure works fine. But if I "gpc -o str str.pas -DBAD" then I get: "123". I lost my delete procedure :'-(
Just 0.02$ in that thread... I tried to compile this program with GPC 19991030 on Sparc Solaris7 (based on GCC 2.95) as described by original author. In both cases it works for me flawlesly.
Regards