This is not really a serious bug because it only generates a warning and the code works OK. Its very complicating to explain, so just have a look at the (BIG) example below:
{--TYPES.PAS-----------------------------------------------}
Unit Types;
Interface
Type TRecord = Record Data : Word; End;
Implementation
End.
{--PROC.PAS-----------------------------------------------}
Unit Proc;
Interface
Uses Types;
Procedure TheProc(Var Data:TRecord);
Implementation
Procedure TheProc(Var Data:TRecord); Begin End;
End.
{--BUG.PAS------------------------------------------------}
Program Bug; Uses Types,Proc; Var Data : TRecord; Begin TheProc(Data); { Line 8 } End.
{---------------------------------------------------------}
The compiler spews out the following warning message when compiling:
bug.pas: In function `program_Bug': bug.pas:8: warning: passing arg 1 of `Theproc' from incompatible pointer type
{--------------------------------------------------------}
The pointer is obviously NOT incompatible since its the SAME TYPE.
As an aside: If "TheProc" is a method of an object, the compiler reports that the incompatible pointer type is passed in "arg 2" instead of "arg 1". :-)
{--------------------------------------------------------}
Now, this is what I call a bug report! Its HUGE, and the bug isnt even very serious! :-)
Good Work ________________________ | _) | | e-mail: bernie@icenet.com.au |___)ernhard |_|schirren ptschirrenb@cc.curtin.edu.au www: www.geocities.com/CollegePark/Quad/8070/