Khimenko Victor wrote:
> Perhaps. If I'll be able to understood how to use GC at all (and no, NOT as
> replacement for normal new/free functions!).
As I've never used it so far, I can't tell you, but there must be a
way to use it without replacing malloc/free.
> P.S. If you are just replacing malloc with GC_alloc then you asking for
> troubles (nasty DoS attacks).
Depends on the kind of program, doesn't it? If it isn't a server (or
run by one), the worst it could do is eat up memory and CPU time.
But a malicious user who can run a program on a system can do this,
anyway. Am I missing something?
Of course, using GC_malloc_atomic can have its advantages, and you
can use it with the hooks mentioned in my previous mail.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
Greetings from New Zealand,
It appears to me that in some situations gpc refuses to compile because it
loses information about enumerated types defined in units. I'm using gpc
version 19990118, based on gcc-2.8.1, under linux.
(I gave up on using gpc under OS/2).
Below is a minimal example--about 50 lines of source code divided across
2 units and a main program, all in separate files. Please tell me if I've
done something wrong or if you know of a work-around. Thanks,
Jeff Miller
miller(a)otago.ac.nz
http://psy.otago.ac.nz/miller
Unit gnutstb1; { this unit is in file gnutstb1.pas }
Interface
Type MyType = (eenie, meenie, minie, mo,
eenie2, meenie2, minie2, mo2,
eenie3, meenie3, minie3, mo3,
eenie4, meenie4, minie4, mo4,
eenie5, meenie5, minie5, mo5,
eenie6, meenie6, minie6, mo6,
eenie7, meenie7, minie7, mo7,
eenie8, meenie8, minie8, mo8,
eenie9, meenie9, minie9, mo9
);
Basic = Object
BoolArr : Array[MyType] of Boolean;
Constructor Construct;
End;
Implementation
Constructor Basic.Construct;
Begin
BoolArr[eenie] := True;
BoolArr[meenie] := False;
BoolArr[minie] := False;
BoolArr[mo] := False;
End;
End. { end of file gnutstb1.pas }
Unit gnutstb2; { this unit is in file gnutstb2.pas }
Interface
Uses gnutstb1;
Type
Derived1 = Object(Basic)
Unused : Char;
Constructor Construct;
End;
Implementation
Constructor Derived1.Construct;
Begin
Basic.Construct;
BoolArr[meenie] := True;
End;
End. { end of file gnutstb2.pas }
Program GnuTstB3; { This main program is in file gnutstb3.pas }
Uses gnutstb1, gnutstb2;
Type
Derived2 = Object(Derived1)
Unused2 : Char;
Constructor Construct;
End;
Constructor Derived2.Construct;
Begin
Derived1.Construct;
BoolArr[minie] := True; { gpc says "type mismatch in array index" }
End;
Var D2 : Derived2;
Begin
D2.Construct;
If D2.BoolArr[minie] { gpc again says "type mismatch in array index" }
Then Writeln('True') Else Writeln('False');
End. { end of file gnutstb3.pas }
When I issue the command
gpc gnutstb3.pas --automake --borland-pascal
I get the output
gnutstb3.pas: In function `Derived2_Construct':
gnutstb3.pas:17: type mismatch in array index
gnutstb3.pas: In function `program_Gnutstb3':
gnutstb3.pas:24: type mismatch in array index
These files were made OK (as far as I can tell):
gnutstb1.o gnutstb2.gpi gnutstb1.gpi gnutstb2.o
One of the things that steers me away from Borland Pascal is its lack
of a runtime garbage collector.
Does GNU Pascal have a runtime garbage collector?
Sincerely,
==Joe Blask==
It is very nice of you, Dr A Olowofoyeku, to provide such a binary.
But why is it labelled as gpc-19991111-etc? The latest source I could find
was gpc-19991030,
from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/alpha/.
BTW, could gpc provide a CVS source, so that we can fetch the latest
snapshot?
> ----------
> From: Dr A Olowofoyeku[SMTP:laa12@law.keele.ac.uk]
> Sent: Wednesday, March 08, 2000 4:22 AM
> To: Mark Taylor; gpc(a)gnu.de
> Subject: Re: Mingw version of GPC based on latest GCC 2.95?
>
> On 8 Mar 00, at 9:58, Mark Taylor wrote:
>
> >
> > Has anyone built the Cygwin or Mingw version of GPC based on the
> > latest GCC 2.95?
> >
> > Does anyone plan to do this?
>
> I have built a Cygwin compiler (which is also able to produce Mingw
> programs), for gcc 2.95.2. You can download it from:
> ftp://agnes.dida.physik.uni-essen.de/home/chief/
>
>
> > If not, I will have a go myself, but this might be a big effort as I
> > have never built GCC or GPC before. If anyone can offer pointers I
> > would be most gratefull.
>
> It is relatively straightforward to build a Cygwin compiler, as long as
> you have the full and latest Cygwin distribution. I am due to write
> some notes for building GPC on Cygwin, but I don't have the time
> yet. If you can understand bash scripts, I can send you the
> (commented) bash script that I use to automate all the steps. You
> should be able to work from that.
>
> > If successfull, I would then be in a position
> > to offer my services in helping with further development of the
> > compiler. Something I would be interested in would be recoding GPC in
> > Pascal (I am sure this would make it easier for more people to
> > contribute their help) - would this be feasible, or does GPC *have* to
> > be coded in C for some reason?
>
> Yes. AFAIK all GNU compilers *have* to be coded in C. Large parts
> of the GPC runtime library are of course coded in Pascal.
>
> Best regards, The Chief
> -----
> Dr Abimbola A Olowofoyeku (The African Chief)
> Email: African_Chief(a)bigfoot.com
> Author of Chief's Installer Pro v5.22 for Win32
> http://www.bigfoot.com/~African_Chief/chief32.htm
>
Has anyone built the Cygwin or Mingw version of GPC based on the
latest GCC 2.95?
Does anyone plan to do this?
If not, I will have a go myself, but this might be a big effort as I
have never built GCC or GPC before. If anyone can offer pointers I
would be most gratefull. If successfull, I would then be in a
position to offer my services in helping with further development of
the compiler. Something I would be interested in would be recoding
GPC in Pascal (I am sure this would make it easier for more people to
contribute their help) - would this be feasible, or does GPC *have*
to be coded in C for some reason?
Mark.
--
Mark Taylor,
Department of Corporate Information & Computing Services,
Extension 21145.
(0114) 222 1145
http://www.shef.ac.uk/misc/personal/ad1mt
The opinions expressed in this email are mine and not those of the University of Sheffield.
Hi !
I have been using GPC on Sun/Solaris for a while, and at this point I want
to know,
If there exist X-Windows programing library, and If so, where can I get it.
Regards
Alex
============================
Alex Romaniuk, External Computer Systems
(Technical Departement)
Tel.+386 61 1722543 (Fax. 1722590)
http://www.mobitel.si, Slovenia
===========================
Using gpc version 19991030, based on 2.95.2 19991024 (release)
output is:
HELLO
yes
Hope this helps
Russ <russwhit(a)mind.net>
----------
> From: miller(a)otago.ac.nz
> To: gpc(a)gnu.de
> Cc: miller(a)psy.otago.ac.nz
> Subject: Cannot produce executable
> Date: Wednesday, March 01, 2000 2:55 PM
>
> Greetings,
>
> I have some statistical programs that I would like to release under GPL.
> They were originally written in Borland Pascal and Speed Pascal (the
latter
> is a borland-like pascal for OS/2), and all the code compiles and runs
fine
> using those two compilers. Now I am trying to get everything to
> compile and run under gpc, so that the code will be useful to more
> people. It looks like I'll have a lot of questions along the way,
> and I'd appreciate any help that can be provided.
>
> I'm using a version of gpc that I installed as a binary from the file
> gpc-19990118_i386-pc-emx0_9d.zip
>
> I can compile and run little test programs that use no units,
> or that use only type definitions from units, but I get "undefined
symbol"
> messages if the main program refers to any variables or procedures
> defined in the interface part of the unit.
>
> Here is a small example, adapted from one posted recently.
>
> The file def.pas has the following unit:
>
> UNIT modul;
> INTERFACE
>
> TYPE
> CARDINAL = 0..65535;
> LONGBITSET = SET OF 0..63;
>
> Var ModS : Integer;
>
> PROCEDURE HELLO;
>
> IMPLEMENTATION
>
> PROCEDURE HELLO;
> BEGIN
> WRITELN('HELLO');
> END;
>
> END.
>
> The file test.pas has this test program.
>
> program test;
> USES modul;
> var
> i:CARDINAL;
> c:LONGBITSET;
> begin
> ModS := 0;
> Hello;
> c:=[1];
> i:=1;
> if (i in c) then writeln('yes');
> end.
>
> gpc -c def.pas works fine, but
> gpc test.pas
> yields the messages
> d:\tcpip\tmp\ccc00799: Undefined symbol _Mods referenced from text
segment
> d:\tcpip\tmp\ccc00799: Undefined symbol _Hello referenced from text
segment
>
> d:\tcpip\tmp is my temp directory, and I noticed that running gpc leaves
> a lot lot of small files called cca000*.exe in the temp directory.
>
> Can anyone tell me what I'm doing wrong?
>
> Thank you for your time,
>
> Jeff Miller
> Dept of Psychology
> University of Otago
> Dunedin, New Zealand
> miller(a)otago.ac.nz
> http://psy.otago.ac.nz/miller
>
Greetings,
I have some statistical programs that I would like to release under GPL.
They were originally written in Borland Pascal and Speed Pascal (the latter
is a borland-like pascal for OS/2), and all the code compiles and runs fine
using those two compilers. Now I am trying to get everything to
compile and run under gpc, so that the code will be useful to more
people. It looks like I'll have a lot of questions along the way,
and I'd appreciate any help that can be provided.
I'm using a version of gpc that I installed as a binary from the file
gpc-19990118_i386-pc-emx0_9d.zip
I can compile and run little test programs that use no units,
or that use only type definitions from units, but I get "undefined symbol"
messages if the main program refers to any variables or procedures
defined in the interface part of the unit.
Here is a small example, adapted from one posted recently.
The file def.pas has the following unit:
UNIT modul;
INTERFACE
TYPE
CARDINAL = 0..65535;
LONGBITSET = SET OF 0..63;
Var ModS : Integer;
PROCEDURE HELLO;
IMPLEMENTATION
PROCEDURE HELLO;
BEGIN
WRITELN('HELLO');
END;
END.
The file test.pas has this test program.
program test;
USES modul;
var
i:CARDINAL;
c:LONGBITSET;
begin
ModS := 0;
Hello;
c:=[1];
i:=1;
if (i in c) then writeln('yes');
end.
gpc -c def.pas works fine, but
gpc test.pas
yields the messages
d:\tcpip\tmp\ccc00799: Undefined symbol _Mods referenced from text segment
d:\tcpip\tmp\ccc00799: Undefined symbol _Hello referenced from text segment
d:\tcpip\tmp is my temp directory, and I noticed that running gpc leaves
a lot lot of small files called cca000*.exe in the temp directory.
Can anyone tell me what I'm doing wrong?
Thank you for your time,
Jeff Miller
Dept of Psychology
University of Otago
Dunedin, New Zealand
miller(a)otago.ac.nz
http://psy.otago.ac.nz/miller
Ronald Bianchin wrote:
> I've a problem with install gpc.
> After unpack gpc-19990118 I've move the files
> to /opt/gpc, copy /p/* to gcc/p/* and
> execute patch -s -p1 < p/diffs/gcc-2.8.1.diff.
You have to unpack the sources of GCC in a matching version before.
There are several possible versions as shown in the diff file names.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
miller(a)otago.ac.nz wrote:
> I have some statistical programs that I would like to release under GPL.
> They were originally written in Borland Pascal and Speed Pascal (the latter
> is a borland-like pascal for OS/2), and all the code compiles and runs fine
> using those two compilers. Now I am trying to get everything to
> compile and run under gpc, so that the code will be useful to more
> people. It looks like I'll have a lot of questions along the way,
> and I'd appreciate any help that can be provided.
>
> I'm using a version of gpc that I installed as a binary from the file
> gpc-19990118_i386-pc-emx0_9d.zip
>
> I can compile and run little test programs that use no units,
> or that use only type definitions from units, but I get "undefined symbol"
> messages if the main program refers to any variables or procedures
> defined in the interface part of the unit.
Try compiling with `--automake' which also compiles units
automatically, so don't have to compile them with `-c' before.
If this doesn't work (automake is a bit buggy under Dos), try
`--autobuild' instead.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html