Weird error...
Frank Heckenbach
frank at tim.gerwinski.de
Fri Aug 21 23:12:05 CEST 1998
Orlando Llanes wrote:
> I got the following error:
>
> testpcx.pas:4: storage class specified for parameter `Close'
Can't reproduce this one with my current version, so I assume it's been
fixed by now. Much has changed since the last release, and this was
probably among the bug fixes made.
BTW (seeing the contents of edsys.pas and edfile.pas): GPC does support
untyped files and BlockRead/BlockWrite (already since January), so there's
actually no reason for you to do these workarounds you do with C files and
direct libc calls. (And FillChar is build in which is internally the same
as memset.)
> testpcx.pas: In function `program_Testpcx':
> testpcx.pas:33: warning: passing arg 4 of `Pcxencode' from incompatible
> pointer type
>
> I have simplified the source as much as possible while leaving the
> source structure as is to reproduce the error. I'm using GPC 2.8.1 under
> DOS. The warning on line 33 is insignificant as far as I know, I'm passing
> an address, and the routine expects a pointer.
The warning is correct. You pass a pointer to EDUInt8 and the routine
expects a PArray8 which is a quite different type. (Not all pointer
types are the same in Pascal!) To get rid of the warning, you can use
type casting.
> BTW, if you recall, I got an error a long time ago about an empty
> record. I found a way around that, I left the unit to keep up the source
> structure, but I defined everything in an include file and included it
> into the unit itself, now I don't have that problem anymore (I hope :}).
This bug should have been fixed in the next version, too. (I had a lot
of problems with various instances of this bug, too...)
Frank
--
Frank Heckenbach, frank at fjf.gnu.de
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan
More information about the Gpc
mailing list