Bill Allombert on Sun, 15 May 2005 22:02:38 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

GP2C-0.0.4 released

Hello PARI-dev,

I have just released GP2C 0.0.4, the GP to C compiler

You can get it here:

This is a major release, The main goal being to generate nicer code
that follow the current libpari interface and the C standard.

There are some changes to the interface, only the first being backward

1) Variables declared with a type do not have a default value anymore.
   See "Effect of types declaration on default values" in the manual.

This means the following is not allowed anymore:
f() /*argument missing*/
If you want to allow x to be omitted, you need to specify a default
value explicitly:
f() /*OK*/
However, if you do not specify a type, the old behaviour is preserved:
f() /*OK*/

2) PARI/GP 2.1 is still supported but will not pass the test-suite,
because it has a bug in the prototype parser and it does not support
forvec in library mode.

3) You can now redefine a function. this is not very useful since only
the second definition is used, and GP2C will emit a warning, but this
allow the code below to compile: 

addhelp(foo,"Meta-syntatic function")

4) ./configure now support a option --with-paricfg.dbg. This allow to
specify the pari.cfg file of a PARI installation compiled with 
./Configure -g and is used by gp2c-dbg, so you can have at the same time
gp2c-run using optimised PARI binaries and gp2c-dbg using debugging PARI

5) You can add custom GP2C descriptions to desc/override.desc to tweak
gp2c behaviour.

6) You can define the types of several variables at once using the
following syntax:
this is a short-hand for 

7) Now gp2c support complex expressions as default values:
For example
will compile.
However beware tat the semantic might not match GP semantic in
self-referential cases:
f(2) will return [2,2], while GP would return [2,x].

8) prodeuler is now supported.

9) This release was checked to work on a 64-bit plateform.

Additionally, a lot of other changes were made to make gp2c generate code
that follows the current libpari style (in particular it use gel(),
gerepileall(), NEXT_PRIME_VIA_DIFF() when available).