Hi all
I have tried several times in the past to install GPC on linux with
different degrees of success... :)
Are there any RPM or binary distibutions for the newest GPC for
RedHat 7.2? If not, what version of gcc is the preferred one to use
in the compilation step at the time? Currently I have downloaded
gcc-core-2.95.2.tar.gz and gpc-20020402.tar.gz from
http://www.gnu-pascal.de/current/ I already have the RH7.2 standard
gcc installed, and I'd like to install gpc for a user, not root...
…
[View More]Best regards
Preben Bohn
=====
Lack of skill dictates economy of style.
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
[View Less]
Quite to my surprise I got a linker error with a module named "files":
/usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o): In function `init_Files':
files.o(.text+0xb28): multiple definition of `init_Files'
general/target/files.o(.text+0xea4): first defined here
/usr/bin/ld: Warning: size of symbol `init_Files' changed from 99 to 67 in /usr/lib/gcc-lib/i386-linux/2.95.4/libgpc.a(files.o)
collect2: ld returned 1 exit status
Changing the module name to e.g. "ffiles" get's me around this, …
[View More]bummers
that I've to change the name in all imports.
What other (module) names are forbidden in my code?
And is there any change that a future release will do better then to
polute my namespace with module names I didn't (explicitly) import?
--
groetjes, carel
[View Less]
I have just moved to RC 3. Looking at the list of fixed bugs it is
obvious that a lot of work has been done in the last few months; thanks
to all concerned. The stricter type checking required a lot of effort
to get our code to compile but in fairness did highlight a number of
problems in our code; so I think it was time well spent. However I am
now stuck because of the following problem:
Program WriteTest;
Procedure ZWriteln(AString:String);
Begin
AString:=AString+'ML';
Writeln('String […
[View More]',AString,'] Length is ',Length(AString));
End;
Begin
ZWriteln(' ');
End.
What I see is that length is reported as 1 i.e. the string concatenation
is failing. Is this expected behaviour or a bug?
I also note that trying to set the Capacity of a string schema is now
flagged as an error. Is there an "official" way to set the capacity?
We were only setting the capacity as a workaround for problems in
previous versions of gpc where under various circumstances it wasn't
initialised properly. My first stab is to comment out all the places
where we were setting capacity but I can't test if everything is OK
because of the problem noted above.
--
Martin Liddle, Tynemouth Computer Services, 27 Garforth Close,
Cramlington, Northumberland, England, NE23 6EW.
Phone: 01670-712624. Fax: 01670-717324.
Web site: <http://www.tynecomp.co.uk>.
[View Less]
Interesting. However, I wonder if this truncation is valid. Looking at
ISO-10206, it states in section <6.4.6 Assignment-compatibility> :
"At any place where the rule of assignment-compatibility is used ...
c) it shall be an error if T1 and T2 are compatible, T1 is a string-type
or the char-type, and the length of the value of T2 is greater than the
capacity of T1;"
My interpretation of this, is that in this situation, the statement
<AString:=AString+'ML'> should have resulted in …
[View More]an error, since
the compiler only allocated a capacity of 1 to AString, yet such
a concatenation can never fit within this capacity.
Joe.
> -----Original Message-----
> From: Frank Heckenbach [SMTP:frank@g-n-u.de]
> Sent: Monday, March 18, 2002 8:42 AM
> To: gpc(a)gnu.de
> Subject: Re: Problem with gpc 2.1 RC 3
>
> Prof Abimbola Olowofoyeku wrote:
>
> > On 17 Mar 2002 at 13:16, Martin Liddle wrote:
> >
> > > I have just moved to RC 3. Looking at the list of fixed bugs it is
> > > obvious that a lot of work has been done in the last few months;
> thanks
> > > to all concerned. The stricter type checking required a lot of effort
> > > to get our code to compile but in fairness did highlight a number of
> > > problems in our code; so I think it was time well spent. However I am
> > > now stuck because of the following problem:
> > >
> > > Program WriteTest;
> > >
> > > Procedure ZWriteln(AString:String);
> > > Begin
> > > AString:=AString+'ML';
> > > Writeln('String [',AString,'] Length is ',Length(AString));
> > > End;
> > >
> > > Begin
> > > ZWriteln(' ');
> > > End.
> > >
> > > What I see is that length is reported as 1 i.e. the string
> concatenation
> > > is failing. Is this expected behaviour or a bug?
> >
> > It is a bug alright. If you pass a string variable rather than a
> > literal to 'ZWriteln', the concatentation is successful. So, something
> > seems to have gone awry somewhere.
>
> No, it's not a bug. `AString' is a formal parameter of
> undiscriminated schema type. This means it assumes the discriminants
> (in case of String: Capacity) of the actual parameter. In the
> example, the actual parameter is a string constant of length 1. It
> also has capacity 1, since constants can't change, anyway.
>
> So also the parameter has capacity 1 during the execution of
> `ZWriteln'. Assigning ` ML' (the result of concatenation) to a
> capacity 1 string results in truncation to ` '. This behaviour is
> not new, BTW.
>
------ snip ------
[View Less]
Forwarded as this doesn't seem to have been sent to the list.
Alle 20:55, martedì 26 marzo 2002, hai scritto:
> In article <200203261732.SAA15974(a)science.unitn.it>, Silvio a Beccara
> <abeccara(a)science.unitn.it> writes
>
> >Before I forget: with the C program, I just compiled it very normally, and
> > it gave me no error, just the correct results.
>
> Post a small test program in C showing what you did.
Here it is:
#include <stdio.h>
#…
[View More]include <math.h>
int main()
{
int i;
double ris, esp;
for(i=1;i<=100;i++) {
esp = (double)i * 1000.0;
ris = exp(-esp);
printf("Exp of %g = %g\n", esp, ris);
}
}
--
Martin Liddle, Tynemouth Computer Services, 27 Garforth Close,
Cramlington, Northumberland, England, NE23 6EW.
Phone: 01670-712624. Fax: 01670-717324.
Web site: <http://www.tynecomp.co.uk>.
[View Less]