Is GPC dead?

Waldek Hebisch hebisch at
Thu Dec 29 06:01:56 CET 2016

John L. Ries wrote:
> It would be nice if we could find something on the website more recent
> than 2005 (perhaps a changelog and links to the current codebase); maybe
> some instructions on how to get GPC to compile with GCC 5 and 6, or at
> least a sense of how one would go about creating the necessary patches to
> the latter.

I a sense porting process is simple (or you may call it primitive):
first put gpc files into gcc tree and try to apply as much of patches
to older gcc as applies.  Then try to compile, this will produce
tons of errors.  Form the errors see what changed in gcc and adapt
gpc to the change.  In current gpc source there are a conditionals
which choose version of gpc code apropriate for given gcc version,
but during porting one can work with single version and add
conditionals later.  After sevaral iterations one should obtain
compilable version.  Then run testsuite and fix regressions.

Finding out what exactly needs to be changed is important part
of the work.  For example when some gcc function used by gpc
is missing one needs to find out how to handle this.  Sometimes
function is no longer needed and one may simply delete the call.
Sometimes there is a rename and one has to use new name.  Sometimes
there is a deeper change.  To know what to do it is helpful to
look at gcc change logs and at parts of C compiler parallel to
Pascal compiler.
> Personally, I would be overjoyed if I had some time to contribute to GPC
> development, but I work too many hours at my regular job to consider it at
> the present time; but perhaps there are some small things that some of us
> could do to move things along at the rate of an hour or two a week per
> person.

Concerning adapting to newer gcc: this is probably about one man-month
per gcc version.  It is poorly decomposable problem: there are interactions
with earlier step and it is important to use facts established in
earlier steps in subsequent steps.  If you make long break you
are likely to forget things and re-do discovery work.  
Actually, discovery work for single problem is likely to take
more than two hours, so if you literally mean two hours per
week (as opposed to say a weeked per quater) than you will have
trouble making any progress.  Also given that new versions
appear yearly at slow speed you will end up with port to newer,
but still obsolete gcc version.

                              Waldek Hebisch

More information about the Gpc mailing list