[PATCH]: clean up -Wc++-compat warnings from gcc files used in libgcc

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Jul 4 23:01:00 GMT 2008


On Fri, Jul 4, 2008 at 5:04 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
> Gabriel Dos Reis wrote:
>>
>> On Fri, Jul 4, 2008 at 4:07 PM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>
>>>
>>> I really don't understand why we are now trying to build _everything_
>>> with a C++ compiler.  I thought this was about the compiler only.
>>>
>>
>> I thought libgcc was part of the compiler.
>>
>>
>
> I was also under the impression that the point was to be able to build the
> *compiler* sources with a C++ compiler.

That is my understanding as well.
Apparently we seem to diverge on what is included in the compiler.

My understanding is that libgcc is not the runtime for the C language
-- that runtime
has been outsourced to somewhere else.  Rather it is the runtime that comes with
GCC to support programs compiled witrh GNU frontends, e.g. if I build
only a C++
compiler I still get libgcc (libgcc contains routines like
multiplication of integers, floats, etc.).

>  I didn't think that would ever mean
> changing the machinery to build the C library routines with a C++ compiler.

It is not my expectation that all runtimes of languages supported by GCC would
be built with a C++ compiler.


>  It seems more logical to me that the C compiler should just build its own
> libraries...  in which case the -Wc++-compat flag is kind of pointless.
>
> Is someone also planning to build a C++ compiler without building the C
> compiler?

In a world where all the things that you need to compile g++ is compilable
with a C++ compiler, why would you need to build a C compiler?

>  thats about the only way I can see any sense in it, but I don't
> really see that being a useful exercise either.
>
> Andrew
>



More information about the Gcc-patches mailing list