You cannot use SizeOf with objects?!?! It just does not work. It either
aborts during compilation, or it returns rediculous values during execution.
Bye
________________________
| _) | | e-mail: bernie(a)icenet.com.au
|___)ernhard |_|schirren ptschirrenb(a)cc.curtin.edu.au
www: www.geocities.com/CollegePark/Quad/8070/
OK, the following code does not seem to actually define the variable - just
take a look at the asm produced by gpc!
Unit
Testing;
Interface
Var
TheBug : __Volatile__ Integer;
Implementation
End.
To work around this bug you can use the code below:
Unit
Testing;
Interface
Var
TheBug : __Volatile__ __AsmName__ 'Thebug' Integer;
TheBug : Integer;
Implementation
Begin
Asm(".globl _Thebug");
End.
WHY: The __AsmName__?
GPC defines '_thebug' instead of '…
[View More]_Thebug' (capital)
The second definition?
GPC does not define TheBug with __Volatile__. It knows that 'TheBug'
exists, but it does not output it into the asm.
The explicit .globl?
GPC forgets to do this!
Cya
________________________
| _) | | e-mail: bernie(a)icenet.com.au
|___)ernhard |_|schirren ptschirrenb(a)cc.curtin.edu.au
www: www.geocities.com/CollegePark/Quad/8070/
[View Less]
Im BACK! :-)
I backed up my entire system on tape, formatted the HDDs and installed
Win95. Naturally, it took me a while to get my computer back into working
order... But now, everything seems OK - Only a whole lot slower due to
Win95 :-)
Remember those procedural type errors? They seem to have disappeared in the
latest beta (using GPC1.EXE in GPC1_EXE.gz)! I havent done any extensive
tests, however my programs compiled OK. Good work Peter!
Cya L8r
________________________
| _) | |…
[View More] e-mail: bernie(a)icenet.com.au
|___)ernhard |_|schirren ptschirrenb(a)cc.curtin.edu.au
www: www.geocities.com/CollegePark/Quad/8070/
[View Less]
A new bug has crept its way into the latest beta of GPC (970714 for DJGPP
2.01). It does not appear in the earlier versions!
Unfortunately I could not make a small test program which demonstrats this
bug. Im working on it...
The bug occurs when loading a unit that contains an object with virtual
methods. The following error message occurs:
bug.pas:2: storage class specified for parameter 'Tobject_Tobject_Methodname'
bug.pas:2: storage class specified for parameter `Tobject_Methodname'
Im …
[View More]hoping that these example error messages reveal what the problem is. I
suspect it has something to do with the duplicate 'Tobject' in the first line.
NOTE: Line 2 of BUG.PAS is 'USES TheUnit;'
Good Luck
________________________
| _) | | e-mail: bernie(a)icenet.com.au
|___)ernhard |_|schirren ptschirrenb(a)cc.curtin.edu.au
www: www.geocities.com/CollegePark/Quad/8070/
[View Less]
I downloaded the binary distribution for gpc:
gpc-2.0i386-cygwin32-b17.1.zip
and unzipped it into a directory. (This is all the installation
instructions on the GPC WWW site said to do.) I added the \bin
subdirectory to my PATH. When I tried to compile the "hello.pas"
program, I got an error message:
GPC.EXE: installation problem, cannot exec 'gpc-cpp': no such file or
directory.
GPC.EXE: Internal compiler error: program gpc-cpp got fatal signal 127
I actually think this program is …
[View More]looking for the file 'cygwin.dll', but
this file was not included with the distribution. I did also install
Cygwin32, but that did not help.
Can someone please tell me what I am doing wrong?
Thanks!
Andy Seila
--
========================================================================
Andrew F. Seila e-mail andy(a)ms.cba.uga.edu
Terry College of Business voice campus 706-542-4290
201 Brooks Hall fax campus 706-542-4295
The University of Georgia voice home 706-353-2221
Athens, GA 30602-6255 fax home 706-369-9791
========================================================================
[View Less]
According to myself (Peter Gerwinski):
>
> I just succeeded to reproduce the bug under Linux DOSEMU.
That was bogus. :-( What I did was to move `gpc1' around after compiling,
but my `gpc1.exe' was still gpc-970714. With gpc-970721 I still cannot
reproduce the bug. :-( :-(
I am uploading my version of `gpc1.exe' (which happily compiled your
"foo.pas" sample program) to
ftp://agnes.dida.physik.uni-essen.de/home/peter/gpc1.exe.gz
If the error still occurs ... well, what can we do …
[View More]then?
Then we are in trouble:
To produce the error, in line 134 of `gpi-hash.c',
for (l = hash_table[hi]; l && l->node; l = l->next)
`l' must be nonzero, but point to some nonsense. How do entries in
`hash_table' get their values? At the beginning of each storing/loading
of a GPI file, `hash_table' is `bzero'ed now, and the only other access
to `hash_table' is in `set_uid()' (line 173-177) - where I don't see any
error. So the only remaining origin of this error I can think of is if
some other part of GPC destroys the contents of `hash_table' ... :-(
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski(a)uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]
[View Less]
According to Bill Currie:
>
> Yup, I suspected that. You use linux, don't you?
Yep.
> Probably got a very
> different memory allocation scheme.
Probably. But I just succeeded to reproduce the bug under Linux DOSEMU.
:-) So I have a chance now to find this bug. However I cannot promise
anything because Alexey who is on holidays at the moment hacked that code.
> What do you think of my
> theory about destroyed trees?
I'd normally agree, but one of my latest changes …
[View More]was to zero out
the hash table at the beginning of each GPI file ...
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski(a)uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]
[View Less]
According to peter:
>From peter Tue Jul 22 12:41:31 1997
Subject: gpi-hash.c segfaults
To: gpc(a)hut.fi
Date: Tue, 22 Jul 1997 12:41:31 +0200 (MEST)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Content-Length: 1483
According to Bill Currie:
>
> I just applied both sets of patches to gpc to take it up to 970721
> (hopefully properly) and unfortunatly, gpc still segfaults in
> get_uid.
> …
[View More][...]
> Hmm, I just tried out my previous sample file (under windows 95) and
> got a crash as well, so my above reasoning may be incorrect.
As you probably were afraid of already, I cannot reproduce the bug. :-(
> Call frame traceback EIPs:
> 0x000ee4d0 _get_uid+32, line 134 of gpi-hash.c
> [...]
Just to be sure that we are talking about the same GPC:
My line 134 of gpi-hash.c reads
for (l = hash_table[hi]; l && l->node; l =l->next)
If the "l &&" is missing or commented out in your version, this would be
the origin of the error. :-(But it isn't. That would be too easy.)
> the command line uses was:gpc -O2 -o foo.o -c foo.pas
It compiles fine on my system:
% gpc -O2 -o foo.o -c foo.pas
foo.pas: In function `Dectobin':
foo.pas:22: warning: return value of function not assigned
> Sigh, this is getting frustrating (and probably more so for you,
> Peter)
Such is life. But it's good that you have found this error *now*
and not later when gpc-2.1 will be released. That's what beta
test phases are for. Thanks a lot for your patience with GPC!
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski(a)uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]
[View Less]
Hello, everybody!
Just for your information (with gpc-970721):
bo5-6u.pas: In function `Writeit':
bo5-6u.pas:12: prior parameter's size depends on `What'
(Read: A bug I already fixed twice in the foregoing days
is back again and again ... )-:
This happens with a parameter of a schema type like this:
Type
Matrix ( n: Integer ) = array [ 1..n, 1..n ] of Real;
I will see what I can do against it <sigh> ...
Yours,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, …
[View More]Germany, free physicist and programmer
peter.gerwinski(a)uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]
[View Less]