Jose Oliver Gil wrote:
Hello again,
Now, I have updated to gpc version 19990118, based on egcs-2.91.60 19981201 (egcs-1.1.1 release).
I have found out another bug with this version, when I define two local variables, with the same name, in two different units but in the same file, e.g.
UNIT TEST1; INTERFACE IMPLEMENTATION var Repeated:integer; END.
UNIT TEST2; INTERFACE IMPLEMENTATION var Repeated:integer; END.
the following error is displayed
/tmp/cca09330.s: Assembler messages: /tmp/cca09330.s:31: Error: Ignoring attempt to re-define symbol /tmp/cca09330.s:31: Error: Rest of line ignored. First ignored character is `,'.
If I am defining the variable Repeated in the implementation zone, why does the assembler think that it's a re-definition? Is it a compiler bug?
Yes. Multiple units/modules/programs in one source file are not supported perfectly. It will be fixed sometime, but don't hold your breath...
For now, it's best to split your sources into separate files.
Frank