Hello,
I found the following bug in the Beta version of GPC.
Best regards,
Peter Dietrich
--------------------
GPC-Version (gpc -v):
Reading specs from C:\usr\local\lib\gcc-lib\i386-mingw32\2.8.1\specs
gpc version 19990118, based on gcc-2.8.1
System-Version:
Windows NT 4.0 on i386
Problem description:
If a unit A is included in a USE clause which includes unit B, and B in turn
includes
unit A the compiler gets an error when it tries to compile A again. This is true
with
option --autobuild and option --automake. The error does not occur if all units
are in
the same directory.
Why does the compiler try to recompile A?
Looking at the gpi file I found that only the filename is stored, not the full
or
relative path name.
In the following test case replace A by "windows.pas" and B by "sysutils.pas":
C:\Di\gp\uvw>gpc --autobuild -g -O0 --extended-syntax --short-circuit
..\lib\kernel32.a uvw.pas
..\\isidef\\isidefnt.pas:99: warning: identifiers should not contain two
adjacent underscores
..\\isidef\\isidefnt.pas:137: warning: identifiers should not start with an
underscore
..\\lib\\sysdef.pas:21: warning: identifiers should not start with an underscore
..\\lib\\sysdef.pas:46: warning: identifiers should not contain two adjacent
underscores
uvw_def.pas:13: module `windows' could not be compiled
gpc1.exe: gpc exited with status 1
uvw.pas:44: module `uvw_def' could not be compiled
C:\Di\gp\uvw>dir
Datenträger in Laufwerk C: hat keine Bezeichnung.
Datenträgernummer: 18CF-0161
Verzeichnis von C:\Di\gp\uvw
08.09.99 14:37 <DIR> .
08.09.99 14:37 <DIR> ..
08.09.99 14:29 118.175 gpc.gpi
08.09.99 14:29 7.882 gpc.o
08.09.99 14:29 53.174 isidefnt.gpi
08.09.99 14:29 37.585 isidefnt.o
08.09.99 14:29 34.918 sysdef.gpi
08.09.99 14:29 6.140 sysdef.o
08.09.99 14:29 21.989 sysutils.gpi
08.09.99 14:29 13.331 sysutils.o
08.09.99 14:37 3.511 units.txt
08.09.99 13:44 169.401 uvw.pas
08.09.99 12:04 71.933 uvw_def.pas
08.09.99 14:29 19.733 windows.gpi
08.09.99 14:29 5.437 windows.o
15 Datei(en) 563.209 Bytes
683.836.416 Bytes frei
C:\Di\gp\uvw>dir ..\lib
Datenträger in Laufwerk C: hat keine Bezeichnung.
Datenträgernummer: 18CF-0161
Verzeichnis von C:\Di\gp\lib
08.09.99 14:18 <DIR> .
08.09.99 14:18 <DIR> ..
16.06.99 12:18 14.286 kernel32.a
16.06.99 12:18 293 kernel32.def
08.09.99 14:04 5.650 paslib.pas
08.09.99 13:58 32.315 ssvlib.pas
08.09.99 13:21 14.523 sysdef.pas
08.09.99 14:18 6.085 sysutils.pas
08.09.99 14:29 5.754 windows.pas
9 Datei(en) 78.906 Bytes
683.840.000 Bytes frei
C:\Di\gp\uvw>dir ..\isidef
Datenträger in Laufwerk C: hat keine Bezeichnung.
Datenträgernummer: 18CF-0161
Verzeichnis von C:\Di\gp\isidef
08.09.99 11:57 <DIR> .
08.09.99 11:57 <DIR> ..
21.04.99 11:46 469 iokeywords.pas
08.09.99 13:41 279.742 isidef.pas
21.06.99 12:27 78.592 isidefdt.pas
08.09.99 14:03 31.008 isidefmap.pas
10.06.99 13:28 43.015 isidefmap.pas.uvw
10.06.99 12:22 353 isidefmap_U.PAS
03.06.99 10:00 2.525 isidefmsg.pas
08.09.99 13:32 31.246 isidefnt.pas
17.06.99 15:26 1.388 test_isidef.pas
11 Datei(en) 468.338 Bytes
683.840.000 Bytes frei
C:\Di\gp\uvw>
Headers of program and units:
-----------------------------
PROGRAM uvw ;
{$IFDEF __GPC__}
{$DEFINE GP}
{$ELSE}
{$DEFINE BP}
{$LONGSTRINGS ON}
{$APPTYPE CONSOLE}
{$ENDIF}
{$B-}
USES
{$IFDEF BP}
Sharemem,
Math,
FileCtrl,
SysUtils,
sysdef,
isidefnt,
uvw_def;
{$ELSE}
sysutils in '..\lib\sysutils.pas',
sysdef in '..\lib\sysdef.pas',
isidefnt in '..\isidef\isidefnt.pas',
uvw_def;
{$ENDIF}
--------
UNIT sysutils;
INTERFACE
USES GPC,
windows in '..\lib\windows.pas';
--------
UNIT windows;
INTERFACE
USES
GPC;
--------
UNIT sysdef;
{$IFDEF __GPC__}
{$DEFINE GP}
{$ELSE}
{$DEFINE BP}
{$LONGSTRINGS ON}
{$ENDIF}
INTERFACE
USES
{$IFDEF BP}
Sharemem,
isidefnt;
{$ELSE}
isidefnt in '..\isidef\isidefnt.pas';
{$ENDIF}
--------
UNIT isidefnt;
{$IFDEF __GPC__}
{$DEFINE GP}
{$ELSE}
{$DEFINE BP}
{$LONGSTRINGS ON}
{$ENDIF}
INTERFACE
USES
{$IFDEF BP}
Sharemem,
Math,
FileCtrl,
Windows,
SysUtils;
{$ELSE}
GPC,
windows in '..\lib\windows.pas',
sysutils in '..\lib\sysutils.pas';
{$ENDIF}
--------
UNIT uvw_def;
INTERFACE
USES
{$IFDEF BP}
Sharemem,
Math,
sysutils,
sysdef,
isidefnt;
{$ELSE}
sysutils in '..\lib\sysutils.pas',
sysdef in '..\lib\sysdef.pas',
isidefnt in '..\isidef\isidefnt.pas';
{$ENDIF}
________________________________________________________________________________________
This communication contains information which may be confidential. It is for the
exclusive use of the intended recipient. If you are not the intended recipient,
please note that any distribution, copying or use of this communication or the
information in it is prohibited. If you have received this communication in
error, please notify us by email or by telephone on ++49 6151 989 0 and then
delete the email and any copies of it.