[fpc-devel]Strange error in fpc 1.0.7

Jonas Maebe jonas at zeus.rug.ac.be
Mon Jul 29 11:54:35 CEST 2002

On Mon, 29 Jul 2002, Michail A.Baikov wrote:

> mmsystem.pas(2465) Warning: stuff\out\mmsystem.ppw Interface CRC
> changed -154616
> 6811<>-334088799
> What's wrong?
Do you get this warning while compiling the mmsystem unit? In that case,
it's most likely an error in the unit where a procedure is defined
differently in the interface and in the implementation, but that error is
not caught by the compiler.

I don't know whether the following example is still possible, but you
could get this e.g. with

unit test;


procedure t;


procedure t; cdecl; external;


The reason is that when the interface is parsed, the compiler thinks it's
a normal procedure and thus uses a mangled name like U_TEST_$$_T or
something for the procedure. In the implementation it turns out it's a
function from a C library and thus the magled name is changed to 't'. This
changes the interface of the unit after it has been completely parsed, so
you get the above warning.


More information about the fpc-devel mailing list