I am trying to make gpc work with gpc 3.1.1. Currently gpc1 compiles and links (I omitted gcpp, runtime and the 'gpc' driver). About 80% of testsuite works, but the remaining bugs still make compiler unuseable: -- gcp1 crashes trying to use gpc unit -- sometimes arrays and records are mislayed -- record layout functions complain about function declarations in objects. Of course, a bunch of minor bugs also shows up.
I have a few questions about getting my work into mainline: -- is there anybody working on the same thing (the disscusion few months ago suggested that nobody)? -- should I try to resolve remaning bugs before I submit a patch? -- is gpc supposed to compile with other C compilers or only with gcc? More specific questions will follow (I spent last week offline).
Waldek Hebisch wrote:
I am trying to make gpc work with gpc 3.1.1.
Great! :-)
Currently gpc1 compiles and links (I omitted gcpp, runtime and the 'gpc' driver).
These should be mostly harmless -- I suppose minor changes to gpc and gpcpp and maybe none at all to the runtime system.
About 80% of testsuite works, but the remaining bugs still make compiler unuseable: -- gcp1 crashes trying to use gpc unit -- sometimes arrays and records are mislayed -- record layout functions complain about function declarations in objects. Of course, a bunch of minor bugs also shows up.
I have a few questions about getting my work into mainline: -- is there anybody working on the same thing (the disscusion few months ago suggested that nobody)?
AFAIK, nobody.
-- should I try to resolve remaning bugs before I submit a patch?
As you like. If you submit it now, maybe someone else will work with you on the remaining problems (though I slightly doubt it ...). Surely, it can't hurt to submit the patch, and I can put it on alpha/ on the website.
-- is gpc supposed to compile with other C compilers or only with gcc?
Theoretically yes, but I don't think the current version (2.1) does because AFAIK nobody has tried it for a long time. -- Actually, someone tried last year and reported a few small problems, but before I got around to fixing them, they'd built it with GCC. So I expect there are a few more problems, but mostly minor ones.
However, this should be quite independent of the gcc-3 port. If you have access to another C compiler and want to test it, be welcome to submit patches (or bug reports) as well.
Frank
Waldek Hebisch wrote:
I am trying to make gpc work with gpc 3.1.1.
Great! :-)
Currently gpc1 compiles and links (I omitted gcpp, runtime and the 'gpc' driver).
These should be mostly harmless -- I suppose minor changes to gpc and gpcpp and maybe none at all to the runtime system.
About 80% of testsuite works, but the remaining bugs still make compiler unuseable: -- gcp1 crashes trying to use gpc unit -- sometimes arrays and records are mislayed -- record layout functions complain about function declarations in objects. Of course, a bunch of minor bugs also shows up.
I have a few questions about getting my work into mainline: -- is there anybody working on the same thing (the disscusion few months ago suggested that nobody)?
AFAIK, nobody.
-- should I try to resolve remaning bugs before I submit a patch?
As you like. If you submit it now, maybe someone else will work with you on the remaining problems (though I slightly doubt it ...). Surely, it can't hurt to submit the patch, and I can put it on alpha/ on the website.
-- is gpc supposed to compile with other C compilers or only with gcc?
Theoretically yes, but I don't think the current version (2.1) does because AFAIK nobody has tried it for a long time. -- Actually, someone tried last year and reported a few small problems, but before I got around to fixing them, they'd built it with GCC. So I expect there are a few more problems, but mostly minor ones.
However, this should be quite independent of the gcc-3 port. If you have access to another C compiler and want to test it, be welcome to submit patches (or bug reports) as well.
Well, I am trying to get int correct spirit to fit well with the rest of the compiler. My question about other C compilers were motiveted by the following problems: -- GCC 3.x headers forbids (using #pragma GCC poison) Berkeley functions bcopy, bzero, bcmp, rindex, is it OK to eliminate them completly from GPC -- currentely I get many warnings, mostly about dropping const qualifier from pointers, I would like elminate them -- GPC uses gansidecl.h, which is absent in GCC 3.x, currently I just copied gansidecl.h from 2.5.3, but I would like to eliminate it -- are ANSI compatibility macros mandatory in GPC (I very much prefer just giving full prototypes, including types and argument names, but of course I will use what is considered proper for GPC) -- in few places GCC extensions are handy. But I other folks wish to compile GPC with other C compilers, then I will avoid them
Waldek Hebisch wrote:
Well, I am trying to get int correct spirit to fit well with the rest of the compiler. My question about other C compilers were motiveted by the following problems: -- GCC 3.x headers forbids (using #pragma GCC poison) Berkeley functions bcopy, bzero, bcmp, rindex, is it OK to eliminate them completly from GPC
Actually, I've done so to a large extent recently. I'll upload a patch soon. I'm trying to get some more bugs fixed that were reported recently, but if you'd like to have my changes now, let me know.
-- currentely I get many warnings, mostly about dropping const qualifier from pointers, I would like elminate them
Sure. As you've probably seen, there are a number of places in GPC where that's already been done -- often conditionally with `#ifdef EGCS97'. (Since EGCS97 is out of date, we'll never port to it, so it can be regarded as equivalent to gcc-3; if you want to rename the conditional, go ahead, but it doesn't matter much, and once GPC works stable with gcc-3, we can eliminate all the conditionals, anyway.)
-- GPC uses gansidecl.h, which is absent in GCC 3.x, currently I just copied gansidecl.h from 2.5.3, but I would like to eliminate it -- are ANSI compatibility macros mandatory in GPC (I very much prefer just giving full prototypes, including types and argument names, but of course I will use what is considered proper for GPC)
In the long run, it's, of course, the best to do it like the rest of the current GCC sources. However, since we currently have to maintain compatibility to older GCC versions, I wouldn't suggest to do anything that requires extensive changes (many ifdefs etc.). It seems easier to do that after porting to gcc-3, when we only have to deal with one GCC version.
-- in few places GCC extensions are handy. But I other folks wish to compile GPC with other C compilers, then I will avoid them
It's better to avoid them.
Frank
[CCing gcc@gcc.gnu.org]
Waldek Hebisch writes:
I am trying to make gpc work with gpc 3.1.1. Currently gpc1 compiles and links (I omitted gcpp, runtime and the 'gpc' driver). About 80% of testsuite works, but the remaining bugs still make compiler unuseable: -- gcp1 crashes trying to use gpc unit -- sometimes arrays and records are mislayed -- record layout functions complain about function declarations in objects. Of course, a bunch of minor bugs also shows up.
I have a few questions about getting my work into mainline: -- is there anybody working on the same thing (the disscusion few months ago suggested that nobody)? -- should I try to resolve remaning bugs before I submit a patch?
the question is where you want to submit a patch. assuming you want to integrate gpc with the current (development) gcc, you should work with the current gcc CVS HEAD branch. IIRC the gcc branch will open again after the gcc-3.3 branch point (October/November 2002). Then you have a window of about four month to submit major additions.
Working with the gcc-3.1.1 sources, your work probably won't be accepted by the gcc upstream developers, although it might be easier then to port it to 3.3 or 3.4. [Working with 3.2 instead of 3.1.1 seems to be better, because it's the latest released version]
Either way, maybe you want to ask for a gpc_branch in the gcc CVS, so that your work gets a broader audience.
Matthias
gpc supposed to compile with other C compilers or only with gcc? More specific questions will follow (I spent last week offline).
-- Waldek Hebisch hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl
Matthias Klose wrote:
the question is where you want to submit a patch. assuming you want to integrate gpc with the current (development) gcc, you should work with the current gcc CVS HEAD branch. IIRC the gcc branch will open again after the gcc-3.3 branch point (October/November 2002). Then you have a window of about four month to submit major additions.
Working with the gcc-3.1.1 sources, your work probably won't be accepted by the gcc upstream developers, although it might be easier then to port it to 3.3 or 3.4.
I think it's better to first get GPC working and stable with any gcc-3 version, and then think about integration.
The changes between gcc-2 and gcc-3 are probably bigger than between the different gcc-3 versions.
Frank
Frank Heckenbach wrote:
Matthias Klose wrote:
the question is where you want to submit a patch. assuming you want to integrate gpc with the current (development) gcc, you should work with the current gcc CVS HEAD branch. IIRC the gcc branch will open again after the gcc-3.3 branch point (October/November 2002). Then you have a window of about four month to submit major additions.
Working with the gcc-3.1.1 sources, your work probably won't be accepted by the gcc upstream developers, although it might be easier then to port it to 3.3 or 3.4.
I think it's better to first get GPC working and stable with any gcc-3 version, and then think about integration.
The changes between gcc-2 and gcc-3 are probably bigger than between the different gcc-3 versions.
I just checked my changes against gcc-3.2. The diff applied without problems (one chunk was at different offset), tests go the same as with 3.1.1. Anyway, the diff to main gcc is less then 14kb, so it should be easy to merge -- the problem is rather that some parts of the diff are very Pascal specific. Moreover about 10kb of diff goes stright from diff to 2.95.3.
So the real problem is how much the interface between front-end and the back-end changes -- there are significant differences between 3.0 and 3.1. However since the interface is now much cleaner I hope that it will change slower and the impact on core GPC will be limited.
So I fully agree with Frank.
On Sat, 7 Sep 2002, Frank Heckenbach wrote:
The changes between gcc-2 and gcc-3 are probably bigger than between the different gcc-3 versions.
That's an understatement. Concider these changes in the GCC backend in going from GCC-2.95.3 to GCC-3.2:
These files were dropped:
dyn-string.o getpwd.o sched.o splay_tree.o stupid.o
These were added:
bb-reorder.o builtins.o cfg.o cfganal.o cfgbuild.o cfgcleanup.o cfglayout.o cfgloop.o cfgrtl.o conflict.o cselib.o debug.o dependence.o df.o diagnostic.o doloop.o dominance.o dwarf2asm.o ggc-common.o haifa-sched.o hashtable.o hooks.o ifcvt.o langhooks.o lists.o params.o predict.o regrename.o rtl-error.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sibcall.o simplify-rtx.o ssa.o ssa-ccp.o ssa-dce.o stringpool.o timevar.o tree-dump.o tree-inline.o vmsdbgout.o $(GGC)
So there's a starting point for someone to dig deeper.
Russ