Couperin wrote:
I tried to reduce a program I couldn''t compile. You'll see it below. I'm wondering if I made a mistake or if it's really a bug.
I found that the problem comes from : P_Vecteur = ^T_Vecteur = Nil; (Everything is fine if I suppress the "= Nil".) In other programs, this declaration doesn't cause any problem, even if P_Vecteur is the argument of a procedure (and here there is no problem until the last procedure). Is it something I should avoid ?
Here is the output of GPC :
./temp24_u2.pas: In procedure `Diffvecteurs': ./temp24_u2.pas:29: initial value is of wrong type gpc1.exe: c:/djgpp/bin/gpc.exe exited with status 1
It's a GPC bug. I've fixed it (wait for the next release). Thanks for the report. (couper13.pas)
As an aside: As you may have read, Waldek Hebisch and I are working on the port to gcc-3 (it's not completely stable yet, but partially usable). One of the major drawbacks of gcc-2 is the internal memory management system ("obstacks") which has caused us many toubles in GPC. This bug, again, was related to obstacks, so in fact your test worked already with the gcc-3 based GPC. However, I've now fixed the real problem so it also works with obstacks (which was also necessary to fix a related problem I discovered while debugging it (fjf704.pas) and to made the code cleaner, anyway).
Frank