This bug appears when you use an enumerated type, defined in a unit, in the "interface" of another unit which is used by the first (complicated, eh? :) ). Well, better look at the attached example to see what I mean. I compiled the main program with "--automake" and got "incompatible type" errors.
By the way, it would be nice if an updated "known bugs" list was put in GPC's web page. That way, when a program doesn't do what I expected, I would know if it's GPC's fault or mine.
And finally, if there is a beta release, would you please build some binaries? (Compiling GCC is too much for my computer and me; last time I tried I ran out of disk space after about two hours of compilation).
Well, that was all by now. Happy new year, and good luck fixing the bug :)
Miguel.
uses bugenum1,bugenum2;
begin q(e1); end.
unit bugenum1;
interface
type enum = (e1,e2,e3,e4);
function q(v: enum): boolean;
implementation
uses bugenum2;
function q(v: enum): boolean; begin q :=p(v,e1); end;
end.
unit bugenum2;
interface
uses bugenum1;
function p(v1,v2: enum): boolean;
implementation
function p(v1,v2: enum): boolean; begin p :=(v1=v2); end;
end.