Re: gcc-in-cxx branch created

2008-07-03 Thread Daniel Berlin
On Wed, Jul 2, 2008 at 2:30 PM, Hendrik Boom [EMAIL PROTECTED] wrote: On Wed, 25 Jun 2008 20:11:56 -0700, Ian Lance Taylor wrote: Ivan Levashew [EMAIL PROTECTED] writes: Your comment makes little sense in context. Nobody could claim that the existing gengtype code is simple. Not many

Re: gcc-in-cxx branch created

2008-07-03 Thread Hendrik Boom
Thank you for your thoughtful and patient reply. I should probably apologize for the strident tone of my first letter to this mailing list. It reflects a decades-long frustration with the trends in the computer industry, rather than a specific critique of ggc development itself. Gcc is a

Re: gcc-in-cxx branch created

2008-07-02 Thread Hendrik Boom
On Wed, 25 Jun 2008 20:11:56 -0700, Ian Lance Taylor wrote: Ivan Levashew [EMAIL PROTECTED] writes: Your comment makes little sense in context. Nobody could claim that the existing gengtype code is simple. Not many people understand how it works at all. In order to support STL containers

Re: gcc-in-cxx branch created

2008-06-25 Thread Ian Lance Taylor
Ivan Levashew [EMAIL PROTECTED] writes: Your comment makes little sense in context. Nobody could claim that the existing gengtype code is simple. Not many people understand how it works at all. In order to support STL containers holding GC objects, it will need to be modified. I'm sure

Re: gcc-in-cxx branch created

2008-06-24 Thread Gabriel Dos Reis
On Sun, Jun 22, 2008 at 6:24 PM, Bruno Haible [EMAIL PROTECTED] wrote: Dear Ian, A comment regarding the GCC-in-C++ idea. In slide 16 you merely answer C++ is too complicated! with Maintainers will ensure that gcc continues to be maintainable. C++ has, for example, 12 different ways

Re: gcc-in-cxx branch created

2008-06-24 Thread Gabriel Dos Reis
On Mon, Jun 23, 2008 at 6:14 AM, Bruno Haible [EMAIL PROTECTED] wrote: Arnaud Charlet wrote: One possibility is to do what we do for Ada: have a style/coding checker built into the compiler (C++ front-end) as a special switch, and enable this switch during bootstrap, so that any such coding

Re: gcc-in-cxx branch created

2008-06-24 Thread Richard Guenther
On Tue, Jun 24, 2008 at 3:54 AM, Tom Tromey [EMAIL PROTECTED] wrote: Ian == Ian Lance Taylor [EMAIL PROTECTED] writes: Ian The other major TODO is to work out the details of using STL Ian containers with GC allocated objects. This means teaching gengtype Ian how to generate code to traverse

Re: gcc-in-cxx branch created

2008-06-24 Thread Bruno Haible
Gabriel Dos Reis wrote: There is a subset of C++ templates stable enough over the years, that can be used without fear, uncertainty and doubt. Absolutely. Can you specify this usable subset of C++ templates formally? That would be valuable advice for maintainers. So that maintainers can decide

Re: gcc-in-cxx branch created

2008-06-24 Thread Bruno Haible
Ian Lance Taylor wrote: Whether we use C or C++, we need to try to ensure that interfaces are easy to understand, that the code is reasonably modular, that the internal documentation corresponds to the code, that it is possible for new developers to write new passes and to fix bugs. Fully

Re: gcc-in-cxx branch created

2008-06-24 Thread Gabriel Dos Reis
On Tue, Jun 24, 2008 at 5:47 AM, Bruno Haible [EMAIL PROTECTED] wrote: Gabriel Dos Reis wrote: There is a subset of C++ templates stable enough over the years, that can be used without fear, uncertainty and doubt. Absolutely. Can you specify this usable subset of C++ templates formally?

Re: gcc-in-cxx branch created

2008-06-24 Thread Tom Tromey
Kaveh == Kaveh R GHAZI [EMAIL PROTECTED] writes: Kaveh We could also extend -Wc++-compat to warn about more things, using C++ Kaveh reserved keywords like class in C comes to mind. This isn't super hard, and IMO is worth doing (right now -Wc++-compat seems almost silly in its limitations), but

Re: gcc-in-cxx branch created

2008-06-24 Thread Ian Lance Taylor
Bruno Haible [EMAIL PROTECTED] writes: What is the level of C++ that new developers need to master, in order to understand the code in general and to fix bugs in average areas? I don't know. I think we will have to find out. I expect that we will find it appropriate to use STL containers, as

Re: gcc-in-cxx branch created

2008-06-24 Thread Ivan Levashew
Ian Lance Taylor пишет: Ivan Levashew [EMAIL PROTECTED] writes: Ian Lance Taylor пишет: The other major TODO is to work out the details of using STL containers with GC allocated objects. This means teaching gengtype how to generate code to traverse STL containers, which would then be used

Re: gcc-in-cxx branch created

2008-06-24 Thread Ross Smith
Ian Lance Taylor wrote: I expect that we will find it appropriate to use STL containers, as in for (Type::iterator p = container.begin(); p != container.end(); ++p) For loops like this I'd recommend using some kind of FOREACH macro (the functional equivalent of BOOST_FOREACH; this is easy

Re: gcc-in-cxx branch created

2008-06-23 Thread Arnaud Charlet
How can maintainers ensure this does not happen? What is your suggestion, stay with C? It doesn't have type safe enums either. One possibility is to do what we do for Ada: have a style/coding checker built into the compiler (C++ front-end) as a special switch, and enable this switch during

Re: gcc-in-cxx branch created

2008-06-23 Thread Joseph S. Myers
On Mon, 23 Jun 2008, Arnaud Charlet wrote: How can maintainers ensure this does not happen? What is your suggestion, stay with C? It doesn't have type safe enums either. One possibility is to do what we do for Ada: have a style/coding checker built into the compiler (C++ front-end)

Re: gcc-in-cxx branch created

2008-06-23 Thread Arnaud Charlet
I've thought such a thing would be useful for C style as well. Right. It just becomes more of an issue if people start using C++ which is a much more complex and large language, but it would also benefit gcc developers today to have C coding standard checked automatically. One slight

Re: gcc-in-cxx branch created

2008-06-23 Thread Ian Lance Taylor
Bruno Haible [EMAIL PROTECTED] writes: A comment regarding the GCC-in-C++ idea. In slide 16 you merely answer C++ is too complicated! with Maintainers will ensure that gcc continues to be maintainable. C++ has, for example, 12 different ways to represent or invoke a function. It has

Re: gcc-in-cxx branch created

2008-06-23 Thread Bruno Haible
Arnaud Charlet wrote: One possibility is to do what we do for Ada: have a style/coding checker built into the compiler (C++ front-end) as a special switch, and enable this switch during bootstrap, so that any such coding style violation is transformed into an error Yes, this can be the

Re: gcc-in-cxx branch created

2008-06-23 Thread Tom Tromey
Ian == Ian Lance Taylor [EMAIL PROTECTED] writes: Ian The other major TODO is to work out the details of using STL Ian containers with GC allocated objects. This means teaching gengtype Ian how to generate code to traverse STL containers, which would then be Ian used during GC. This is not a

Re: gcc-in-cxx branch created

2008-06-22 Thread Bruno Haible
Dear Ian, A comment regarding the GCC-in-C++ idea. In slide 16 you merely answer C++ is too complicated! with Maintainers will ensure that gcc continues to be maintainable. C++ has, for example, 12 different ways to represent or invoke a function. It has no buikt-in typesafe enums. Sooner

Re: gcc-in-cxx branch created

2008-06-22 Thread Chris Lattner
On Jun 22, 2008, at 4:24 PM, Bruno Haible wrote: Dear Ian, A comment regarding the GCC-in-C++ idea. In slide 16 you merely answer C++ is too complicated! with Maintainers will ensure that gcc continues to be maintainable. C++ has, for example, 12 different ways to represent or invoke a

Re: gcc-in-cxx branch created

2008-06-21 Thread Ivan Levashew
Ian Lance Taylor пишет: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop a version of gcc which is compiled with C++. Here are my

Re: gcc-in-cxx branch created

2008-06-21 Thread Ivan Levashew
Ian Lance Taylor пишет: The other major TODO is to work out the details of using STL containers with GC allocated objects. This means teaching gengtype how to generate code to traverse STL containers, which would then be used during GC. This is not a task for the faint-hearted. That's one of

Re: gcc-in-cxx branch created

2008-06-21 Thread Ian Lance Taylor
Ivan Levashew [EMAIL PROTECTED] writes: Ian Lance Taylor пишет: The other major TODO is to work out the details of using STL containers with GC allocated objects. This means teaching gengtype how to generate code to traverse STL containers, which would then be used during GC. This is not

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Wed, 18 Jun 2008, Doug Gregor wrote: On Wed, Jun 18, 2008 at 2:01 AM, Ian Lance Taylor [EMAIL PROTECTED] wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Thu, 19 Jun 2008, Kaveh R. GHAZI wrote: [...] I believe some work could be done (maybe even on mainline) to activate -Wc++-compat during bootstrap as a warning only, (not an error). E.g.: #pragma GCC diagnostic warning -Wc++-compat This would help clean up some of the easy stuff

Re: gcc-in-cxx branch created

2008-06-19 Thread Gabriel Dos Reis
First, many thanks to Ian for stepping forward to make this happen. On Thu, Jun 19, 2008 at 1:55 AM, Kaveh R. GHAZI [EMAIL PROTECTED] wrote: On Thu, 19 Jun 2008, Kaveh R. GHAZI wrote: [...] I believe some work could be done (maybe even on mainline) to activate -Wc++-compat during bootstrap as

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Thu, 19 Jun 2008, Gabriel Dos Reis wrote: Main offenders (last time I checked) seem be to (1) middle end and back end files who play `enum inheritance' tricks. (2) use of C++ keywords as variable names. (3) implicit conversion from void* to T* -- but we should have ver few of those

Re: gcc-in-cxx branch created

2008-06-19 Thread Gabriel Dos Reis
On Thu, Jun 19, 2008 at 3:10 AM, Kaveh R. GHAZI [EMAIL PROTECTED] wrote: On Thu, 19 Jun 2008, Gabriel Dos Reis wrote: Main offenders (last time I checked) seem be to (1) middle end and back end files who play `enum inheritance' tricks. (2) use of C++ keywords as variable names. (3)

Re: gcc-in-cxx branch created

2008-06-19 Thread Gabriel Dos Reis
On Wed, Jun 18, 2008 at 1:01 AM, Ian Lance Taylor [EMAIL PROTECTED] wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Kaveh R. GHAZI [EMAIL PROTECTED] writes: I read through your slides and I'm interested in contributing. I didn't see the presentation itself so I don't know if this suggestion is redundant. However I believe some work could be done (maybe even on mainline) to activate -Wc++-compat during

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
[ Dropping gcc-patches. ] Gabriel Dos Reis [EMAIL PROTECTED] writes: I have not yet committed any patches to the branch--at present it is just a copy of the trunk. I will start committing patches soon, and anybody else may submit patches as well. The branch will follow the usual gcc

Re: gcc-in-cxx branch created

2008-06-19 Thread Gabriel Dos Reis
On Thu, Jun 19, 2008 at 7:24 AM, Ian Lance Taylor [EMAIL PROTECTED] wrote: The reason I'm asking is that a fresh build o gcc-in-cxx dies on my machine with complains that `program' has conflicting declarations: once in libcpp.h as having C++ linkage, once in toplev.h with a C declaration.

Re: gcc-in-cxx branch created

2008-06-19 Thread Joseph S. Myers
On Thu, 19 Jun 2008, Ian Lance Taylor wrote: Yes. I'm working around that for now by editing toplev.h, to avoid pushing libcpp and libiberty to C++ right away. I'm not convinced there's much value in building libiberty as C++ for GCC, given that it needs to remain buildable as C for now for

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Joseph S. Myers [EMAIL PROTECTED] writes: On Thu, 19 Jun 2008, Ian Lance Taylor wrote: Yes. I'm working around that for now by editing toplev.h, to avoid pushing libcpp and libiberty to C++ right away. I'm not convinced there's much value in building libiberty as C++ for GCC, given that

Re: gcc-in-cxx branch created

2008-06-19 Thread Jens-Michael Hoffmann
Am Mittwoch, 18. Juni 2008 08:01:35 schrieb Ian Lance Taylor: I have not yet committed any patches to the branch--at present it is just a copy of the trunk. I will start committing patches soon, and anybody else may submit patches as well. The branch will follow the usual gcc maintainership

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Jens-Michael Hoffmann [EMAIL PROTECTED] writes: Am Mittwoch, 18. Juni 2008 08:01:35 schrieb Ian Lance Taylor: I have not yet committed any patches to the branch--at present it is just a copy of the trunk. I will start committing patches soon, and anybody else may submit patches as well.

Re: gcc-in-cxx branch created

2008-06-19 Thread Jens-Michael Hoffmann
Am Donnerstag, 19. Juni 2008 18:20:43 schrieb Ian Lance Taylor: Should the branch compile right now? No. I've flipped the branch to start compiling the source files in gcc with C++. Unfortunately a number of issues will need to be addressed before all the code will compile in C++. Most

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Jens-Michael Hoffmann [EMAIL PROTECTED] writes: No. I've flipped the branch to start compiling the source files in gcc with C++. Unfortunately a number of issues will need to be addressed before all the code will compile in C++. Most of this work can and will be contributed back to

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Thu, 19 Jun 2008, Ian Lance Taylor wrote: These are mechanical and can be fixed with simple casts. Again, IMHO these non-controversial patches should go straight into mainline. Once done we can -Werror this warning and avoid regressions. Yes, I agree. Ian Okay, the patch to activate

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Kaveh R. GHAZI [EMAIL PROTECTED] writes: Okay, the patch to activate -Wc++-compat is installed on mainline. I'd like to clean up some of the new warnings, but it sounds like you've got some of this already done behind the scenes. E.g.: http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01264.html

Re: gcc-in-cxx branch created

2008-06-19 Thread Daniel Berlin
On Thu, Jun 19, 2008 at 1:26 PM, Ian Lance Taylor [EMAIL PROTECTED] wrote: Jens-Michael Hoffmann [EMAIL PROTECTED] writes: No. I've flipped the branch to start compiling the source files in gcc with C++. Unfortunately a number of issues will need to be addressed before all the code will

Re: gcc-in-cxx branch created

2008-06-19 Thread Paweł Sikora
On Thursday 19 of June 2008 19:26:27 Ian Lance Taylor wrote: Jens-Michael Hoffmann [EMAIL PROTECTED] writes: No. I've flipped the branch to start compiling the source files in gcc with C++. Unfortunately a number of issues will need to be addressed before all the code will compile in C++.

Re: gcc-in-cxx branch created

2008-06-19 Thread Ian Lance Taylor
Paweł Sikora [EMAIL PROTECTED] writes: there's also a http://www.aei.mpg.de/~peekas/tree/ that may be useful for modeling abstract trees used in compiler. Thanks. I want to be clear that the initial goal of the gcc-in-cxx branch will be to produce code which is quite close to mainline, but

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Thu, 19 Jun 2008, Ian Lance Taylor wrote: Kaveh R. GHAZI [EMAIL PROTECTED] writes: I'd like to avoid stomping on each other and duplicating work. Can you tell me what you've already done and/or plan to do? I have a bunch of patches, but as far as getting them into mainline I'm

Re: gcc-in-cxx branch created

2008-06-19 Thread Aaron Gray
Hi, Just in case you are interested in it I have a 4.2.1 compiling and built using C++. I have not really worked on it for quite a while now. http://www.gccpp.org Download at :- http://www.gccpp.org/download/ Aaron

Re: gcc-in-cxx branch created

2008-06-19 Thread Kaveh R. GHAZI
On Thu, 19 Jun 2008, Kaveh R. GHAZI wrote: I'll do fortran next, then some top level files. I'll post in this thread which ones so we don't overlap. Please do the same. Okay, I'm starting on the top level files. I'll go backwards through the alphabet. Doing [t-z]* right now, that's

gcc-in-cxx branch created

2008-06-18 Thread Ian Lance Taylor
As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop a version of gcc which is compiled with C++. Here are my presentation slides in PDF

Re: gcc-in-cxx branch created

2008-06-18 Thread Doug Gregor
On Wed, Jun 18, 2008 at 2:01 AM, Ian Lance Taylor [EMAIL PROTECTED] wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop

Re: gcc-in-cxx branch created

2008-06-18 Thread Diego Novillo
On 6/18/08 2:01 AM, Ian Lance Taylor wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop a version of gcc which is compiled with C

Re: gcc-in-cxx branch created

2008-06-18 Thread Ian Lance Taylor
[ I dropped gcc-patches from this reply. ] Diego Novillo [EMAIL PROTECTED] writes: On 6/18/08 2:01 AM, Ian Lance Taylor wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta

Re: gcc-in-cxx branch created

2008-06-18 Thread Thomas Neumann
Hi, On 2008-06-17 23:01, Ian Lance Taylor wrote: As I promised at the summit today, I have created the branch gcc-in-cxx (I originally said gcc-in-c++, but I decided that it was better to avoid possible meta-characters). The goal of this branch is to develop a version of gcc which

Re: gcc-in-cxx branch created

2008-06-18 Thread Joseph S. Myers
wwwdocs isn't branched, but there should be a version of codingconventions.html with the conventions being followed for the use of C++ on the branch. (Parts of the libstdc++ coding style may be relevant.) I think a more conservative approach is needed to being buildable with a range of