Re: Using C++ in GCC is OK

2010-06-04 Thread Andrew Haley
On 06/03/2010 09:47 PM, Robert Dewar wrote: > Andrew Haley wrote: > >> Right, but I didn't think there was any plan to convert en masse to >> C++ -- just to allow people to use it where appropriate. Apart from >> anything else, there's always a nonzero probablility of breaking >> something. > >

Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-04 Thread Amker.Cheng
Hi : I found the temp register used for saving registers when expanding prologue is defined by macro MIPS_PROLOGUE_TEMP_REGNUM on mips target, like: #define MIPS_PROLOGUE_TEMP_REGNUM \ (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3) I don't understand why using registers

Re: [x86]: Allow @GOTOFF in non-memory context?

2010-06-04 Thread Rainer Orth
Uros Bizjak writes: > I'm investigating, which "current assemblers" are broken, since my > assembler from binutils-2.20 happily assembles: > > addl x...@gotoff(%ebx), %eax > > in 32bit mode, as well as > > addq x...@gotpcrel(%rip), %rax > > in 64bit mode. > > Looking into gcc install documentatio

Re: Using C++ in GCC is OK

2010-06-04 Thread Larry Evans
On 06/03/10 14:39, Steinar Bang wrote: Larry Evans : claims that switch statements are faster than virtual function calls. That's not really interesting, is it? The overhead and downsides of virtual functions are well known. The upside is the possibility to use polymorphism to make framewo

Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Art Haas
Hi. This morning's i386 build fails with the following error: libbackend.a(sol2.o): In function `solaris_output_init_fini': /home/ahaas/gnu/gcc.git/gcc/config/sol2.c:109: undefined reference to `print_operand' /home/ahaas/gnu/gcc.git/gcc/config/sol2.c:116: undefined reference to `print_operand

Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Nathan Froyd
On Fri, Jun 04, 2010 at 01:44:02PM +, Art Haas wrote: > This morning's i386 build fails with the following error: > > libbackend.a(sol2.o): In function `solaris_output_init_fini': > /home/ahaas/gnu/gcc.git/gcc/config/sol2.c:109: undefined reference to > `print_operand' > /home/ahaas/gnu/gcc.g

Re: Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-04 Thread Ian Lance Taylor
"Amker.Cheng" writes: >I found the temp register used for saving registers when expanding > prologue is defined by > macro MIPS_PROLOGUE_TEMP_REGNUM on mips target, like: > > #define MIPS_PROLOGUE_TEMP_REGNUM \ > (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3) > > I don

Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Ian Lance Taylor
Nathan Froyd writes: > * config/i386/i386-protos.h (ix86_print_operand): Declare. > * config/i386/i386.c (ix86_print_operand): Make non-static. > * config/i386/sol2.h (ASM_OUTPUT_CALL): Call ix86_print_operand. > * rtl.h (output_operand): Declare. > * final.c (output

Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Nathan Froyd
On Fri, Jun 04, 2010 at 07:45:20AM -0700, Ian Lance Taylor wrote: > Nathan Froyd writes: > > * config/i386/i386-protos.h (ix86_print_operand): Declare. > > * config/i386/i386.c (ix86_print_operand): Make non-static. > > * config/i386/sol2.h (ASM_OUTPUT_CALL): Call ix86_print_operand. >

Re: Using C++ in GCC is OK

2010-06-04 Thread Diego Novillo
On Thu, Jun 3, 2010 at 13:42, Andrew Haley wrote: > I'll turn that into a question: does any GCC maintainer intend to convert > working code into C++, with no substantive changes? Not me. Mostly new code and re-engineer only those parts where the value of C++ is a clear advantage. Diego.

Re: Using C++ in GCC is OK

2010-06-04 Thread Kai Tietz
Hi, What's about the "friend"s in C++.. I think it should be forbidden by C++ coding-style, as it is mainly a sign of weak OO design to use them. Kai | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | (")_(") him gain world domination

Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Ian Lance Taylor
Nathan Froyd writes: > On Fri, Jun 04, 2010 at 07:45:20AM -0700, Ian Lance Taylor wrote: >> Nathan Froyd writes: >> >* config/i386/i386-protos.h (ix86_print_operand): Declare. >> >* config/i386/i386.c (ix86_print_operand): Make non-static. >> >* config/i386/sol2.h (ASM_OUTPUT_CALL):

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: Vector indexing patch

2010-06-04 Thread Joseph S. Myers
On Tue, 1 Jun 2010, Artem Shinkarov wrote: > This is a reworked patch of Andrew Pinski "Subscripting on vector > types" in terms of GSoC 2010 [Artjoms Sinkarovs]. We can't consider it without a copyright assignment. > The documentation was not changed. May be there could be some more > ideas to

Auto-generated cross-references can be distributed under the GPL

2010-06-04 Thread Mark Mitchell
The FSF has approved the inclusion of automatically generated cross-reference information (such as that generated by Doxygen, Synopsis, or JavaDoc) in GCC, using GPLv3 for that documentation, rather than the GFDL. There was no license issue in this regard; the question was a policy question. In p

Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Nathan Froyd
On Fri, Jun 04, 2010 at 08:32:26AM -0700, Ian Lance Taylor wrote: > Nathan Froyd writes: > > Looking at things a little more closely, output_address is exported in > > output.h. I suppose output_operand should be exported there as well? > > Yes, put the declaration there, by output_operand_lossa

Re: Using C++ in GCC is OK

2010-06-04 Thread Joseph S. Myers
On Wed, 2 Jun 2010, Richard Guenther wrote: > I'd like us to stick with C comments only. I defintely do not like > a mix of both styles and I can't see an advantage of C++ comments. Agreed. Moving code between bits of the compiler should not mean creating ugly inconsistencies of formatting and

Re: Auto-generated cross-references can be distributed under the GPL

2010-06-04 Thread Joseph S. Myers
On Fri, 4 Jun 2010, Mark Mitchell wrote: > This explicit permission re. cross-references does not resolve the > question of auto-generating parts of GFDL manuals, such as those > containing documentation about target hooks or about command-line > options. (For target hooks, we might wish to consi

Re: Time to create wwwdocs/htdocs/gcc-4.6?

2010-06-04 Thread Joseph S. Myers
On Thu, 3 Jun 2010, Michael Meissner wrote: > You and Richard are correct. I've forgotten that I needed -d on cvs to add > directories after using svn for a few years. I recall there were tools to > convert cvs to svn (such as cvs2svn), but I haven't used them personally. The issue is not and n

Re: GFDL/GPL Issue

2010-06-04 Thread Joseph S. Myers
On Wed, 2 Jun 2010, Mark Mitchell wrote: > For API documentation, or, in general, for new manuals, I have no > opinion. My guess, though, is that the FSF would want the same > invariant sections and such as are on the existing manuals. The standard rules for Cover Texts and inclusion of Invarian

RE: Using C++ in GCC is OK

2010-06-04 Thread Joseph S. Myers
On Wed, 2 Jun 2010, Bingfeng Mei wrote: > Converting to C++ is a major change. Does that justify to have a major > release (5.0.0)? No. It's not in any way user-visible. In principle I agree with what Zack said in on version numbers; certainl

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 opti

Re: Using C++ in GCC is OK

2010-06-04 Thread Joseph S. Myers
On Tue, 1 Jun 2010, Paolo Bonzini wrote: > > I think compiler can and should be host independent, like LLVM. > > It is. Changes to code generation depending on the host are considered to be > serious bugs, and have been long before LLVM existed. I'd like that to be the case, but PR 35466 was cl

Re: Vector indexing patch

2010-06-04 Thread Richard Guenther
On Fri, Jun 4, 2010 at 6:38 PM, Joseph S. Myers wrote: > On Tue, 1 Jun 2010, Artem Shinkarov wrote: > >> This is a reworked patch of Andrew Pinski "Subscripting on vector >> types" in terms of GSoC 2010 [Artjoms Sinkarovs]. > > We can't consider it without a copyright assignment. > >> The document

Re: Using C++ in GCC is OK

2010-06-04 Thread Joseph S. Myers
On Mon, 31 May 2010, Ian Lance Taylor wrote: > I have written a proposed set of C++ coding conventions on the wiki at > http://gcc.gnu.org/wiki/CppConventions > > This is only a preliminary proposal. It requires fleshing out and > discussion. Comments welcome. I think the coding style warn

Re: Vector indexing patch

2010-06-04 Thread Joseph S. Myers
On Fri, 4 Jun 2010, Richard Guenther wrote: > The mark_addressable_vector change was at least semi-ugly. I think > it is reasonable to require a constant index for register qualified vectors. What does the Cell document describing the extension being implemented by the original patch say here?

Re: Using C++ in GCC is OK

2010-06-04 Thread Ian Lance Taylor
"Joseph S. Myers" writes: > On Wed, 2 Jun 2010, Bingfeng Mei wrote: > >> Converting to C++ is a major change. Does that justify to have a major >> release (5.0.0)? > > No. It's not in any way user-visible. In principle I agree with what > Zack said in

RE: Bootstrap failed for i386-pc-solaris2.10 and sparc-sun-solaris2.10

2010-06-04 Thread Arthur Haas
Hi. The patch resolves the build failures. Thanks. Art Haas -Original Message- From: Nathan Froyd [mailto:froy...@codesourcery.com] Sent: Friday, June 04, 2010 12:29 PM To: Ian Lance Taylor Cc: Arthur Haas; gcc@gcc.gnu.org Subject: Re: Bootstrap failed for i386-pc-solaris2.10 and sparc-

Re: Using C++ in GCC is OK

2010-06-04 Thread Gabriel Dos Reis
On Fri, Jun 4, 2010 at 3:55 PM, Ian Lance Taylor wrote: > "Joseph S. Myers" writes: > > I think we should change the gcc major release to 5 when we change the > libstdc++.so major version number to 7. seconded. -- Gaby

Re: Vector indexing patch

2010-06-04 Thread Andrew Pinski
On Tue, Jun 1, 2010 at 12:21 PM, Artem Shinkarov wrote: + error_at (loc, "index value is out of bound"); That is wrong. The Cell C/C++ language document says out of bounds accesses are undefined (that is at runtime). Thanks, Andrew Pinski

Re: Using C++ in GCC is OK

2010-06-04 Thread Jonathan Wakely
On 4 June 2010 21:55, Ian Lance Taylor wrote: > > I think we should change the gcc major release to 5 when we change the > libstdc++.so major version number to 7. I don't speak for the other libstdc++ maintainers, but I think that's a great idea.

Re: Using C++ in GCC is OK

2010-06-04 Thread Mark Mitchell
Joseph S. Myers wrote: > I repeat my request from the RM Q&A for a guide for reviewers on how to > detect hidden overhead in the presence of C++ features. When will a > structure/class/union be larger than might be expected in C? When will > C++ statements involve runtime overhead that might

Re: Using C++ in GCC is OK

2010-06-04 Thread Jeff Law
On 06/04/10 18:48, Mark Mitchell wrote: In C++, you can of course make what looks like simple code do something expensive; for example, you can make "a + b" be arbitrarily complex if "a" and "b" are instances of class types and you have overloaded "+". And, in general, we are trying to av

Re: Using C++ in GCC is OK

2010-06-04 Thread Mark Mitchell
Jeff Law wrote: >>In C++, you can of course make what looks like >> simple code do something expensive; for example, you can make "a + b" be >> arbitrarily complex if "a" and "b" are instances of class types and you >> have overloaded "+". >> > And, in general, we are trying to avoid situa

Re: Using C++ in GCC is OK

2010-06-04 Thread Gabriel Dos Reis
On Fri, Jun 4, 2010 at 7:55 PM, Jeff Law wrote: > On 06/04/10 18:48, Mark Mitchell wrote: >> >>   In C++, you can of course make what looks like >> simple code do something expensive; for example, you can make "a + b" be >> arbitrarily complex if "a" and "b" are instances of class types and you >>

Re: Poor internal documentation (was: dragonegg in FSF gcc?)

2010-06-04 Thread Philipp Thomas
On Fri, 23 Apr 2010 16:23:29 +0200, Manuel López-Ibáñez wrote: >Great! Go ahead, please. The wiki is easy to edit. Finally I got around to do it. Editing is easy ... kind of :) Creating the Links was easy but I failed do discover how I could actually make them point to other wiki pages. > Bon

Re: Puzzle about macro MIPS_PROLOGUE_TEMP_REGNUM

2010-06-04 Thread Richard Sandiford
"Amker.Cheng" writes: > Hi : >I found the temp register used for saving registers when expanding > prologue is defined by > macro MIPS_PROLOGUE_TEMP_REGNUM on mips target, like: > > #define MIPS_PROLOGUE_TEMP_REGNUM \ > (cfun->machine->interrupt_handler_p ? K0_REG_NUM : GP_REG_FIRST + 3) > >