Running gpc-20030507 with gcc-3.2.3 (i486-pc-mingw32), I wish to compile in Extended Pascal mode but also allow the "external" keyword. With "ifmod.pas" containing:
module ifmod;
export ifmod = (proc);
procedure proc; external;
end;
end.
...and compiling this with:
gpc --extended-pascal --enable-keyword=external -c ifmod.pas
...I get:
gpc1.exe: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions.
In fact, I can produce the same error with just:
gpc1 -fenable-keyword=x
...from the i486-pc-mingw32/3.2.3 subdirectory. I have reproduced this on the Chief's distribution as well.
-- Dave
Why can't unit-path be a compiler directive?
And {$uses} for that matter?
I include a prefix file, and I'd rather store the paths in the prefix file so the command line isn't several lines long and I can more easily see what file it is actually compiling.
I can't use a separate "uses xxx;" clause since the prefix file comes before the unit yyy; line in the file.
Is there a good reason they are not allowed?
Thanks, Peter.
Peter N Lewis wrote:
Why can't unit-path be a compiler directive?
Because that's a system installation setting, not part of the Pascal source (same as optimization options etc.). (The result would be programs that only compile on a specific directory structure.)
And {$uses} for that matter?
Because it's equivalent to `uses'.
I include a prefix file, and I'd rather store the paths in the prefix file so the command line isn't several lines long and
The usual place to put such options are Makefiles, scripts, aliases/short cuts, IDE settings etc., not the source code.
I can more easily see what file it is actually compiling.
You might want to use progress messages and a tool to display them.
I can't use a separate "uses xxx;" clause since the prefix file comes before the unit yyy; line in the file.
GPC allows this.
Frank
J. David Bryan wrote:
Running gpc-20030507 with gcc-3.2.3 (i486-pc-mingw32), I wish to compile in Extended Pascal mode but also allow the "external" keyword. With "ifmod.pas" containing:
module ifmod;
export ifmod = (proc);
procedure proc; external;
end;
end.
...and compiling this with:
gpc --extended-pascal --enable-keyword=external -c ifmod.pas
...I get:
gpc1.exe: internal error: Segmentation fault
Will be fixed in the next release. Thanks for the report. (david5.pas)
Frank