On Wed, Mar 03, 2004 at 02:13:42PM +0100, Frank Heckenbach wrote:
Toby Ewing wrote:
[...]
The compiler hangs with the following error: testmt.pas(17): Error: reference expected, value given testmt.pas(17): Error: reference expected, value given testmt.pas(17): Error: tree check: expected class 't', have 'x' (error_mark) in require_complete_type, at p/typecheck.c:63 Please submit a full bug report
I'm guessing that it's not about my unit, but rather what I'm trying to do with capturing a string into an int... anyway, here is a bug report.
I can't reproduce the problem, but I don't know if it's because I might have fixed already (with other changes in the meantime) or because I don't have your unit. Does the following program without the unit also exhibit the problem? Otherwise, could you please send a program to reproduce it?
program testMT; uses GPC; const big = 10000000; TimeFormat = ' %Q'; var t1, t2, i, j : medCard; CurrentTime : TimeStamp;
begin GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t1); { line 17 } { WRONG } for i := 1 to big do j := randInt; GetTimeStamp (CurrentTime); WriteStr(FormatTime(CurrentTime, TimeFormat), t2); Writeln('Elapsed time: ', (t2 - t1):1); end.
Do I understand it correctly that the "reference expected etc." messages are OK, and the only question is about the "tree check" failure?
If so, the error seems to be already fixed in gpc 20030830.
[~/pas]% gpc -v Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs Configured with: ../gcc-3.3.2/configure --enable-languages=pascal --disable-nls : (reconfigured) ../gcc-3.3.2/configure --enable-languages=pascal --disable-nls Thread model: posix gpc version 20030830, based on gcc-3.3.2 [~/pas]% gpc --automake tst.pas tst.pas: In main program: tst.pas:12: error: reference expected, value given tst.pas:12: error: reference expected, value given tst.pas:13: error: undeclared identifier `randInt' (first use in this routine) tst.pas:13: error: (Each undeclared identifier is reported only once tst.pas:13: error: for each routine it appears in.) tst.pas:15: error: reference expected, value given tst.pas:15: error: reference expected, value given
Emil