[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Fri Nov 5 16:25:19 CET 2010


I'd really like to use C++.
  In the gcc backend. Or any otherwise C code.


Obviously I can do without if I must, for now.


It isn't moot in gcc yet since they haven't actually done anything in 4.5.1.


The problem I have with LLVM (and gcc) is largely my own laziness, and projected
laziness on others. gcc has been a "challenge". C and C++ would be relatively easy.
Specifically, knowledge is much better and more widespread what is valid C and C++.
The intermediate code will be easier to form correctly, more easily understood by far more people.
Granted, it doesn't have to be widely understood or easy, and the more difficult forms have advantages.
It would also remove our "source/build dependency". Which granted, might be doable eventually as a gcc plugin.
(That is, the dependency would remain and get larger, but you wouldn't need the source and build it.)


If C/C++ were generated, nearly all porting and platform-testing would no longer needed.
There'd be a source distribution story.
That is, we could really fairly honestly test just a few platforms and claim many more are supported.
Test Linux/x86 (get the #ifdefs working) and all Linux would likely work.
Same for FreeBSD, NetBSD, OpenBSD, Solaris, etc.


C++ also should get us much better exception handling, vs. the current situation.
  (Granted, there are other ways to do it.) We could enable all optimizations most likely.
  And get better debugging with stock gdb.
  Again, granted, these are all doable without.


Maybe LLVM could be tried once C/C++ are working.
  Or someone else can try it.


 - Jay

----------------------------------------
> Subject: Re: [M3commit] CVS Update: cm3
> From: hosking at cs.purdue.edu
> Date: Fri, 5 Nov 2010 11:10:27 -0400
> CC: jkrell at elego.de; m3commit at elegosoft.com
> To: jay.krell at cornell.edu
>
> It's an additional hurdle for installation. There are some platforms where I don't have it already.
> Once the gcc developers require C++ to install gcc's C compiler then I guess maybe this is moot.
> We really should look at using LLVM!
>
> On Nov 5, 2010, at 11:05 AM, Jay K wrote:
>
> >
> > Do you really not have it already?
> > The gcc developers are planning on using C++ in gcc, so the decision has been
> > made, if we stick with gcc and upgrade to that. LLVM is also written in C++.
> > (not that I plan on using it -- my real interest, again, is generating C, but then,
> > rather C++, for exception handling)
> >
> > - Jay
> >
> > ----------------------------------------
> >> From: hosking at cs.purdue.edu
> >> Date: Fri, 5 Nov 2010 09:52:25 -0400
> >> To: jkrell at elego.de
> >> CC: m3commit at elegosoft.com
> >> Subject: Re: [M3commit] CVS Update: cm3
> >>
> >> Umm, not a good plan. I don't want to install C++ just to build the backend!
> >>
> >> On Nov 5, 2010, at 6:11 AM, Jay Krell wrote:
> >>
> >>> CVSROOT: /usr/cvs
> >>> Changes by: jkrell at birch. 10/11/05 06:11:12
> >>>
> >>> Modified files:
> >>> cm3/m3-sys/m3cc/src/: m3makefile
> >>> cm3/m3-sys/m3cc/gcc/gcc/m3cg/: Make-lang.in config-lang.in
> >>> m3-def.h
> >>> Added files:
> >>> cm3/m3-sys/m3cc/gcc/gcc/m3cg/: parse.cpp
> >>> Removed files:
> >>> cm3/m3-sys/m3cc/gcc/gcc/m3cg/: parse.c
> >>>
> >>> Log message:
> >>> switch to C++, I want to use 'scope tricks' to avoid repeating the serialization macros in the handler functions -- the handlers will access member data instead
> >>
> >
>
 		 	   		  


More information about the M3commit mailing list