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]: clean up -Wc++-compat warnings from gcc files used in libgcc


On Fri, Jul 4, 2008 at 3:37 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Sent from my iPhone
>
> On Jul 4, 2008, at 13:32, "Gabriel Dos Reis" <gdr@integrable-solutions.net>
> wrote:
>
>> On Fri, Jul 4, 2008 at 2:35 PM, Richard Guenther
>> <richard.guenther@gmail.com> wrote:
>>>
>>> On Fri, Jul 4, 2008 at 9:25 PM, Kaveh R. GHAZI <ghazi@caip.rutgers.edu>
>>> wrote:
>>>>
>>>> Although compiling libgcc doesn't use -Werror and doesn't hard stop, it
>>>> still gets a bunch of new warnings from files in the gcc directory that
>>>> use the gcc directory's warning flags.  This patch cleans up most the
>>>> noise eminating from my recent warning flag additions.
>>>>
>>>> Bootstrapped on x86_64-unknown-linux-gnu, no regressions.
>>>>
>>>> Okay for mainline?
>>>
>>> Why not add -Wno-c++-compat to the CFLAGS of these files instead?
>>
>> An issue is whether we want to compile libgcc with a C++ compiler
>> or not.  I believe it makes sense.  However, extreme care needs to be
>> taken, as we don't want to drag in the C++ runtime system.
>>
>> I do not understand the argument that is it just a `pure C library'.
>> There is nothing
>> that indicates it cannot not be also a C++ library (assuming we don't
>> drag in the
>> C++ runtime).
>
> Also we don't want any runtime initialization to be snick in. This is the
> reason why I don't it be compiled with a c++ compiler.

If you don't have runtime initialization when compiling with C, you won't
have one when compiling with a C++ compiler.

>
>>
>>
>> -- Gaby
>


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