[fpc-devel] one compiler verbosity wish
Пётр Косаревский
ppkk at mail.ru
Thu Apr 6 18:28:35 CEST 2006
Even with "-va" switch I can't find a clue in the following situation (you may substitute other units and function):
program A;
uses sysutils,windows;
const B:shortstring='1.txt';
begin DeleteFile(B); end.
I get "Incompatible types...PChar expected".
The reason is in the windows unit.
But first guess was that there is an error in sysutils documentation.
It would be great, if in verbose mode (or even in several others) I could read something like
"Incompatible type for windows.deletefile...PChar expected".
-------^----------
or
"Hint: Found...DeleteFile(PChar)...in windows"
^--^------
Without windows unit program works fine with sysutils.DeleteFile(const a:string) function.
More detailed:
meaningful part of log is (it's the file from the beginning of my message with few extra CarriageReturns):
(A) Load from A (implementation) unit WINDOWS
1.pp(5,1) (A) Parsing implementation of 1.pp
1.pp(8,17) Error: Incompatible type for arg no. 1: Got "ShortString", expected "PChar"
Hint: Found declaration: DeleteFile(PChar):LongBool
1.pp(9,4) Fatal: There were 1 errors compiling module, stopping
I get Hint about "wrong" declaration, but don't get it's origin. I read about loading (but what?) from windows.
My first guess was that there is an error in sysutils documentation.
More information about the fpc-devel
mailing list