This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for sC++ to GNU C++.



> I have previously worked with Mike Stump concerning the insertion of
> this patch (first time 3 years ago). In August I contanted Jason
> (jason@cygnus.com) but I have never got any answer, Mike Stump has
> therefore suggested me to contact you in order to get this patch into
> egcs.

In essence you have a new language, sC++.  As I've down quite a bit of
research work on synchronous languages (Esterel and friends), I'm quite
interested.

However, sC++ differs from C++ more than Objective-C differs from C.
The C++ team is working very hard to finish matching the ISO spec,
and I don't blame them if they are not enthusiastic about making big
changes to the C++ front end to incorporate your extensions.

For these reasons, I think that it should be incorporated as a new
language front end, rather than as patches to the C++ front end.  The
reason is to avoid destabilizing the C++ front end, and make
it easy for users to choose or not choose sC++ (download or don't
download the overlay).

The idea is that there would be a new directory gcc/sc which would
be a peer of gcc/cp.  It would contain all of the new sc-xxx.c files.
Initially, the parser would need to be duplicated and modified, which
I don't much like.

I think that Objective-C is a good model for you to follow.  You will
notice, if you look at gcc/c-parse.in, that the bison inputs for C
and for Objective-C are generated from the same file, using a simple
sed-based approach.  If Jason agrees, you could make a similar file
for C++/sC++.  If he's not enthusiastic about this, as a temporary
measure you could duplicate and change the parser; the problem then
becomes that bugs would need to be fixed in two places.  Nevertheless
it would be easier to get your changes made available without interfering
with other developers.

> The patch allows the GNU C++ compiler to accept a small concurrent
> extension called sC++ (home page: http://ltiwww.epfl.ch/sCxx). The sC++
> extension adds 6 new keywords to the C++ language, they are however only
> reserved if the source file to be compiled have one of the extensions
> '.scxx' or '.scc' (or the flag '-fsyncc++' is used).

I suggest dropping -fsyncc++ and just using the extension.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]