This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Fix bootstrap issues with C++


Joseph S. Myers wrote:

>> Well, sure, but the patch didn't seem to be removing any use of
>> designated initializers. 

> In the case of designated initializers, it would also be helpful for 
> someone to indicate the performance cost of not using them when GCC is 
> built with a C++ compiler.  How much startup time is spent on 
> initialization that would be done with designated initializers when built 
> as C?

I'm all for good science, but it seems highly unlikely to me that you'd
be able to measure this difference, even when compiling the empty file.
 That said, designated initializers are clearly a useful feature, and
I'm all for adding them to the GNU dialect of C++, especially in the
case of PODs.  Maintaining the "C++ is a supserset of C" principle -- to
the extent possible -- is clearly desirable.

On the one hand, we have no need to transform GCC into C++ just for the
sake of it.  On the other, there's no reason to resist compiling it as
C++ without evidence of an actual problem.  In the medium term, there
are significant benefits to C++ and we have to take the plunge at some
point.  I think that once we get to the point where the sourcebase can
be built with a C++ compiler, we should throw the switch, even if are
coding standards at that point still forbid any use of the non-C subset
of C++.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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