Gayle Lee Fairless | 20 Jan 03:58 2015
Picon

finding recipe for x86_64 or x86 or Cygwin or MingW or whatever will work

    I installed Cygwin onto an Alienware M17x-R3 running Windows 7 and
also downloaded various files from http://www.gnu-pascal.de/ to add
Pascal to the list of compilers.
gayle <at> weirdcat ~/Documents
$ gcc --version
gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gayle <at> weirdcat ~/Documents

I successfully ran the classic Hello World program under C.

However I have been unable to install Gnu Pascal Compiler although I
believe I have followed the instructions in the manual.  I have tried
both software installation and direct use of a binary file.

I have gpc source files, too.  I also downloaded the source files for
gcc 3.2.3 and gcc 3.4.3 because the manual seems to indicate that I
should compile against a version that produces a standard compiler.  I
have the gpc source file:  gpc-20060325/.

I got as far as the makeinfo file in the manual.  Here is the tail of a
verbose output from makeinfo:

gayle <at> weirdcat ~/Documents
$ tail verbosemakeinfo.txt
checking for .preinit_array/.init_array/.fini_array support... no
checking if mkdir takes one argument... no
(Continue reading)

Waldek Hebisch | 10 Jan 03:11 2015
Picon

Re: gdb-patches RFA: Fix pascal behavior for class fields

> Pierre Muller wrote:
> > 
> > It compiles if you put a 'program' statement at the beginning, and
> > change a.check(b) to assign the function result,
>   I tried this,
> but here is what I get after your changes:
> $ gpc  test-class-pascal.pas
> test-class-pascal.pas:4: error: undeclared identifier `class' (first use in
> this routine)
> test-class-pascal.pas:4: error:  (Each undeclared identifier is reported
> only once
> test-class-pascal.pas:4: error:  for each routine it appears in.)
> test-class-pascal.pas:6: error: undeclared identifier `x' (first use in this
> routine)
> test-class-pascal.pas:6: error: syntax error before `,'
> 
> Pierre <at> d620-muller ~/pas/test
> $ gpc --version
> gpc 20050331, based on gcc-3.4.4 (cygming special, gdc 0.12, using dmd
> 0.125)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Is it because I am using version 3.4.4?

gcc version is not a problem.  But your gpc is too old: classes are
supported starting from gpc-20051104 (the next version after the one
you tried).

(Continue reading)

Prof Abimbola Olowofoyeku | 9 Jan 12:23 2015

Re: gdb-patches RFA: Fix pascal behavior for class fields

On 8 Jan 2015 at 23:12, Pierre Muller wrote:

> For gpc mailing list:
[...]
> 
>   The problem is that GPC and Free Pascal support several
> 
> pascal 'dialects'. But this requires command line options.
> 
> 
> 
>   The -Mobjfpc option is required for Free Pascal compiler
> 
> to understand class type definition, but is rejected in default mode.
> 
> 
> 
>   I expect GNU GPC to also reject class in 'normal' mode...
> 
> Maybe someone on the gpc mailing list knows if classes are supported
> 
> by GPC and if it requires a special compiler option.
> 
> 
> 
> Pierre Muller
> 
> 
> 
> FYI: Here is the example code that is included in the bug report.
(Continue reading)

Pierre Muller | 9 Jan 08:46 2015
Picon

RE: gdb-patches RFA: Fix pascal behavior for class fields

 Hi Peter,

> >   The problem is that GPC and Free Pascal support several
> >
> > pascal 'dialects'. But this requires command line options.
> >
> >
> >
> >   The -Mobjfpc option is required for Free Pascal compiler
> >
> > to understand class type definition, but is rejected in default mode.
> >
> >
> >
> >   I expect GNU GPC to also reject class in 'normal' mode...
> >
> > Maybe someone on the gpc mailing list knows if classes are supported
> >
> > by GPC and if it requires a special compiler option.
> >
> >
> >
> > Pierre Muller
> >
> >
> >
> > FYI: Here is the example code that is included in the bug report.
> >
> >
> >
(Continue reading)

Pierre Muller | 8 Jan 23:12 2015
Picon

gdb-patches RFA: Fix pascal behavior for class fields

For gpc mailing list:

this email comes as a follow-up of this bug report

https://sourceware.org/bugzilla/show_bug.cgi?id=17815

 

The start of the thread can be found at:

https://sourceware.org/ml/gdb-patches/2015-01/msg00164.html

 

Pedro asked:

> >> How about adding this to the test suite?

> >

> >

> >   The whole testsuite/gdb.pascal is almost empty,

> > I never invested time to develop it :(

> >

> >   At the time I started it, GPC (the GNU pascal compiler)

> > was still active, but development apparently

> > stopped since quite some time.

> >

> >   I am unable to install GPC, which means that I cannot test it.

> > Would a testsuite that supports only Free Pascal be acceptable?

>

> Do you actually mean, whether it's ok for a new

> test (not test suite) to go in untested on GPC?  It certainly is.

> Better test on FPC than nowhere.  :-)

  That is indeed what I meant.

 

> AFAICS, the tests themselves don't really care which compiler

> is in use other than for marking xfails; you just call

> gdb_compile_pascal,

> and that works with either.  That's my impression from quickly

> skimming testsuite/lib/pascal.exp.

 

  The problem is that GPC and Free Pascal support several

pascal 'dialects'. But this requires command line options.

 

  The -Mobjfpc option is required for Free Pascal compiler

to understand class type definition, but is rejected in default mode.

 

  I expect GNU GPC to also reject class in 'normal' mode...

Maybe someone on the gpc mailing list knows if classes are supported

by GPC and if it requires a special compiler option.

 

Pierre Muller

 

FYI: Here is the example code that is included in the bug report.

 

$ cat ~/pas/test/test-class-pascal.pas

 

type

  TA = class

  public

  x, y : integer;

  constructor Create;

  function check(b : TA) : boolean;

  destructor Done; virtual;

end;

 

constructor TA.Create;

begin

  x:=-1;

  y:=-1;

end;

 

destructor TA.Done;

begin

end;

 

function TA.check (b : TA) : boolean;

begin

  check:=(x < b.x);

end;

 

 

 

var

  a, b : TA;

 

begin

  a:=TA.Create;

  b:=TA.Create;

  a.x := 67;

  a.y := 33;

  a.check (b);

end.

 

 

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Jay Michael | 16 Dec 03:10 2014
Picon

both too many and too few arguments

GNU Pascal version 20070904, based on gcc-3.4.5 (mingw special).

>gpc jsm6.pas 
jsm6.pas: In main program:
jsm6.pas:7: error: too many (>1) arguments to routine `noargproc'
jsm6.pas:5: error:  routine declaration
jsm6.pas:7: error: too few (1) arguments to function `noargproc'

     I defined a procedure with no arguments.  When I called it with two arguments, I got error messages saying
both "too many" and "too few" arguments.

     What is the significance of the "1" in "too many (>1) arguments" and in "too few (1) arguments"?
Attachment (jsm6.pas): application/octet-stream, 330 bytes
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
trevor | 17 Oct 14:57 2014

mod operator in constants not allowed

as title, I get a compile error when I use the mod operator in constant 
expressions.

eg, with this program ...

     program pmod (Output);
     const
         c = 9 mod 5;    { <<<< error }
     begin
        WriteLn ('9 mod 5 is ', c);
     end. { pmod }

pmod.pas:3: error: constant has non-constant value

I can rewrite the constant as

     c = 9 - 5*(9 div 5);   { this is equivalent to 9 mod 5 }

without problems.

This seems strange to me -  am I missing something?
What makes it a non-constant?

Many Thanks

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Peter | 12 Sep 18:07 2014

Debian packages

I have built some unofficial deb packages for gpc, based on version
20070904, gcc 3.4.6

They should work in modern version of Debian, Mint, Ubuntu etc.
See;-
https://launchpad.net/~ueter/+archive/ubuntu/gpc-3.4/+packages
<https://launchpad.net/%7Eueter/+archive/ubuntu/gpc-3.4/+packages>

Direct link for 64bit deb package which can be installed via gdebi;-
https://launchpad.net/~ueter/+archive/ubuntu/gpc-3.4/+build/6360693
<https://launchpad.net/%7Eueter/+archive/ubuntu/gpc-3.4/+build/6360693>

Any comments or feedback most welcome. My test results for 64 bit are as
follows;-

----------------------------------------------------------------------
for this version of gpc on Debian jessie (x86_64):

        === gpc tests ===

Running target any
Running testsuite ...

UNSUPPORTED: agettext2test.pas
UNSUPPORTED: asmtest.pas
FAIL: fieldw.pas
UNSUPPORTED: fjf165a.pas
FAIL: fjf23.pas
FAIL: fjf30b.pas
FAIL: writeb.pas
FAIL: writec.pas
FAIL: writee.pas
FAIL: writeg.pas

        === gpc Summary ===

# of tests                5112
# of expected passes      5102
# of unexpected failures  7
# of unsupported tests    3

gpc version 20070904, based on gcc-3.4.6
----------------------------------------------------------------------

Peter

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Rajat Singh | 9 Jun 20:06 2014
Picon

Function return value register

Hi,

Is there a way to change the function return value coming in register d0 to come in reigster d7 ?

I tried adding d7 in call_used_registers and updating macro's FUNCTION_VALUE and FUNCTION_VALUE_REGNO_P but it didnt work.

I tried modifying hard_function_value function in explow.c but compilation failed at reload pass.

I am trying to update the backend code for m68k.Any help is appreciated.

Thanks and regards,
Rajat Singh
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Contestcen | 15 May 08:06 2014
Picon

Heap error 203

You can ignore my previous question about Heap Error 203.  I have discovered the variable ReturnNilIfGrowHeapFails which controls the behavior of New.  It is not mentioned in the RTL manual, but it is mentioned in the Programmer's Guide.  I had not read far enough in Chapter 8, which at first reading seemed to be entirely concerned with the sizes of the various data types.
 
The description of New in the RTL manual simply states that New returns nil if space is not available.  It does not say that this feature defaults to off, and has to be turned on by the program.
 
Frank
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Contestcen | 14 May 21:04 2014
Picon

Error 203 Heap is out of memory

Is there any way to prevent an Error 203 when I call New and the heap is out of storage?  The RTL manual says that New should return a nil pointer, but that doesn't seem to happen.  Instead, my program terminates with a 203 error code.  This happens with both {$S+} and {$S-} directives.  I am running DOS under Windows 7.
 
Frank
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Gmane