Peter N Lewis wrote:
Currently, this compiles, I would think it would give a type check error:
program peter112;
type p1 = ^MedInt; p2 = ^MedInt;
procedure doit( p: p1 ); begin end;
var p: p2; begin doit( p ); end.
Should p1 and p2 be parameter type compatible?
MWPascal complains of the type check on the parameter...?
I tried searching the docs for type compatibility, but did not find anything on the subject, perhaps I need to read the spec?
p1 and p2 are distinct types. Distinct pointer types in Pascal are always incompatible. However, gpc (incorrectly) treats poiters to the same type as compatible.
This is a known problem, but requires some effort to fix. BTW, gpc bug list gets updated only when new releas appears, and then AFAICS only fixed bugs gets included. It seems that we need a "real" bug list. Frank, if you do not have time to update bug list in real time, maybe we should ask for a volunteer to maintain the list?