This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: Andrew Pinski <pinskia at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 5 Dec 2013 12:21:47 +0100
- Subject: Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)
- Authentication-results: sourceware.org; auth=none
- References: <1386233288 dot 14008 dot 9 dot camel at yam-132-YW-E178-FTW> <3B985852-FCA6-44C3-9FEC-D18E3CEFAB68 at gmail dot com> <1386238371 dot 14008 dot 30 dot camel at yam-132-YW-E178-FTW>
On Thu, Dec 5, 2013 at 11:12 AM, Oleg Endo <oleg.endo@t-online.de> wrote:
> On Thu, 2013-12-05 at 01:00 -0800, pinskia@gmail.com wrote:
>>
>>
>> No I don't think we want this at all. C++ is clear here. In fact we
>> don't turn on werror for stage 1 for this exact reason. Rather it
>> might be better to check if that flag to turn off the warning and use
>> that. Also this warning is a bad warning for standard c++ code; clang
>> is wrong to enable by default.
>
> Yes, warnings have to be disabled when compiling GCC, since clang
> complains about many more things.
> Anyway, these issues aside ...
>
>> No I don't think we want this at all
>
> ... why is that? What's the purpose/benefit in C++ of repeatedly
> writing "struct X*" if X is already a known type?
There is none, dropping those is fine (but please also look at the
no longer necessary typedefs and rename structs accordingly).
Richard.
> Cheers,
> Oleg
>
>