Re: [RFC] Switching implementation language to C++

2010-06-04 Thread Joseph S. Myers
On Mon, 31 May 2010, Basile Starynkevitch wrote: I would even imagine that later, one could configure GCC to have only a C++ front-end, but no more a C one. That probably would be unusual, since many important applications which want to be compiled by GCC (I am thinking of the Linux kernel)

Re: [RFC] Switching implementation language to C++

2010-06-04 Thread Joseph S. Myers
On Wed, 2 Jun 2010, Richard Guenther wrote: I also notice that all cc1 binaries are dynamically linked against libstdc++ - didn't we want to use -static-libstdc++ and link against the libstdc++ we bootstrap? Yes, that is stated in Ian's slides. There are a series of related configure

Re: [RFC] Switching implementation language to C++

2010-06-02 Thread Richard Guenther
On Tue, Jun 1, 2010 at 6:32 PM, Vladimir Makarov vmaka...@redhat.com wrote: Richard Guenther wrote: On Tue, Jun 1, 2010 at 12:00 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 31, 2010 at 6:22 PM, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Richard Guenther
On Mon, May 31, 2010 at 6:22 PM, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF have agreed to this, we should decide whether we switch and how.  So, I would like comments on the following questions: 1- Should we switch to C++? Yes. 2- What is the cost in terms of

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Richard Guenther
On Tue, Jun 1, 2010 at 12:00 PM, Richard Guenther richard.guent...@gmail.com wrote: On Mon, May 31, 2010 at 6:22 PM, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF have agreed to this, we should decide whether we switch and how.  So, I would like comments on the following

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Toon Moene
On 06/01/2010 08:02 PM, Diego Novillo wrote: On Tue, Jun 1, 2010 at 14:00, Toon Moenet...@moene.org wrote: On 06/01/2010 06:07 PM, Richard Guenther wrote: After fixing build locally I now have Are you planning to commit the fixes - I don't mind being a guinea pig in this - I have been

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Ralf Wildenhues
* Toon Moene wrote on Tue, Jun 01, 2010 at 08:36:53PM CEST: In file included from ../../gcc/libcpp/system.h:341, from ../../gcc/libcpp/expr.c:21: ../../gcc/libcpp/../include/libiberty.h:106: error: new declaration ‘char* basename(const char*)’ /usr/include/string.h:601:

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Joern Rennecke
Quoting Ralf Wildenhues ralf.wildenh...@gmx.de: * Toon Moene wrote on Tue, Jun 01, 2010 at 08:36:53PM CEST: In file included from ../../gcc/libcpp/system.h:341, from ../../gcc/libcpp/expr.c:21: ../../gcc/libcpp/../include/libiberty.h:106: error: new declaration ‘char*

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread Ralf Wildenhues
* Joern Rennecke wrote on Tue, Jun 01, 2010 at 09:11:03PM CEST: Quoting Ralf Wildenhues: * Toon Moene wrote on Tue, Jun 01, 2010 at 08:36:53PM CEST: In file included from ../../gcc/libcpp/system.h:341, from ../../gcc/libcpp/expr.c:21:

Re: [RFC] Switching implementation language to C++

2010-06-01 Thread DJ Delorie
Diego Novillo dnovi...@google.com writes: 4- Should we make the switch during the 4.6 stage 1? My suggestion: put something in one common file that requires C++, just to force the use of C++ compilers, but with a comment that says If you can't build this file, comment out the following and file

[RFC] Switching implementation language to C++

2010-05-31 Thread Diego Novillo
Now that the SC and the FSF have agreed to this, we should decide whether we switch and how. So, I would like comments on the following questions: 1- Should we switch to C++? 2- What is the cost in terms of build time? 3- What coding guidelines should we use? 4- Should we make the switch

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Gabriel Dos Reis
On Mon, May 31, 2010 at 11:22 AM, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF have agreed to this, we should decide whether we switch and how.  So, I would like comments on the following questions: 1- Should we switch to C++? By switch, do you using a C++ compiler to

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Diego Novillo
On 10-05-31 12:50 , Gabriel Dos Reis wrote: By switch, do you using a C++ compiler to compile everything, or that some components may be written only in C++ with sufficient care that they can be linked with other part written in C? Ideally, the former. If we cannot get consensus on that,

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Gabriel Dos Reis
On Mon, May 31, 2010 at 11:54 AM, Diego Novillo dnovi...@google.com wrote: On 10-05-31 12:50 , Gabriel Dos Reis wrote: By switch, do you using a C++ compiler to compile everything, or that some components may be written only in C++ with sufficient care that they can be linked with other part

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Michael Witten
On Mon, May 31, 2010 at 11:22, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF have agreed to this. When did this come up and why? Where can I read more about this? Was there a thread I missed?

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Michael Witten
On Mon, May 31, 2010 at 13:21, Michael Witten mfwit...@gmail.com wrote: On Mon, May 31, 2010 at 11:22, Diego Novillo dnovi...@google.com wrote: Now that the SC and the FSF have agreed to this. When did this come up and why? Where can I read more about this? Was there a thread I missed?

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Mark Mitchell
Diego Novillo wrote: By switch, do you using a C++ compiler to compile everything, or that some components may be written only in C++ with sufficient care that they can be linked with other part written in C? Ideally, the former. If we cannot get consensus on that, then I guess we'd

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Gabriel Dos Reis
On Mon, May 31, 2010 at 1:25 PM, Mark Mitchell m...@codesourcery.com wrote: Diego Novillo wrote: By switch, do you using a C++ compiler to compile everything, or that some components may be written only in C++ with sufficient care that they can be linked with other part written in C?

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Mark Mitchell
Gabriel Dos Reis wrote: Yes, this is the sort of issues I have in mind. For example, I do not see how we can use C++ in tree.h without requiring other front-ends to use C++, at least for the parts that use tree.h. By components, I meant for example, is it the case that the C++ front-end

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Tobias Burnus
Am 31.05.2010 20:50, schrieb Mark Mitchell: Gabriel Dos Reis wrote: Yes, this is the sort of issues I have in mind. For example, I do not see how we can use C++ in tree.h without requiring other front-ends to use C++, at least for the parts that use tree.h. By components, I meant for

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Gabriel Dos Reis
On Mon, May 31, 2010 at 1:50 PM, Mark Mitchell m...@codesourcery.com wrote: Gabriel Dos Reis wrote: Yes, this is the sort of issues I have in mind.  For example, I do not see how we can use C++ in tree.h without requiring other front-ends to use C++, at least for the parts that use

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Mark Mitchell
Gabriel Dos Reis wrote: OK, I will reformulate my question to you and Diego is: is this what we want, e.g. C++ as THE common implementation language, or just ONE common implementation language (the other being C)? I believe that we want (a subset of) C++ to be the language used to implement

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Diego Novillo
On Mon, May 31, 2010 at 15:33, Mark Mitchell m...@codesourcery.com wrote: I believe that we want (a subset of) C++ to be the language used to implement all of GCC, including front-ends, back-ends, and common code.   Where we currently use C, we wish to instead use C++. That's what I want as

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Gabriel Dos Reis
On Mon, May 31, 2010 at 2:35 PM, Diego Novillo dnovi...@google.com wrote: On Mon, May 31, 2010 at 15:33, Mark Mitchell m...@codesourcery.com wrote: I believe that we want (a subset of) C++ to be the language used to implement all of GCC, including front-ends, back-ends, and common code.  

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Toon Moene
On 05/31/2010 06:22 PM, Diego Novillo wrote: Now that the SC and the FSF have agreed to this, we should decide whether we switch and how. So, I would like comments on the following questions: H, when I voted yes on the question Requiring C++ Compiler for GCC Builds (that was the subject

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Basile Starynkevitch
On Mon, 2010-05-31 at 12:33 -0700, Mark Mitchell wrote: Gabriel Dos Reis wrote: OK, I will reformulate my question to you and Diego is: is this what we want, e.g. C++ as THE common implementation language, or just ONE common implementation language (the other being C)? I believe

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Mark Mitchell
Basile Starynkevitch wrote: You forgot to mention plugins. In my understanding, any future GCC plugin would necessarily be coded in C++ and be compiled by a C++ compiler. Am I right? Not necessarily. If we felt it desirable, the interface exposed for plug-ins could be C, not C++. However, I

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Geert Bosch
On May 31, 2010, at 14:25, Mark Mitchell wrote: That doesn't necessarily mean that we have to use lots of C++ features everywhere. We can use the C (almost) subset of C++ if we want to in some places. As an example, if the Fortran folks want to use C in the Fortran front-end, then -- except

Re: [RFC] Switching implementation language to C++

2010-05-31 Thread Mark Mitchell
Geert Bosch wrote: If we're just going to get some new power tools for our workshop and let people have at it, the lessons we'll learn might end up being more about what not to do, rather than a show case of their effective use. That's why we're not doing that. Instead, we're going to