Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread Oleg Endo
On Tue, 2013-12-10 at 09:49 -0800, H.J. Lu wrote: > On Tue, Dec 10, 2013 at 9:44 AM, Jakub Jelinek wrote: > > On Mon, Dec 09, 2013 at 08:49:59PM +0100, Oleg Endo wrote: > >> Tested with make all-gcc. > > > > You should be testing such changes by full bootstrap/regtest. > > I checked in r205866 to

Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread H.J. Lu
On Tue, Dec 10, 2013 at 9:44 AM, Jakub Jelinek wrote: > On Mon, Dec 09, 2013 at 08:49:59PM +0100, Oleg Endo wrote: >> Tested with make all-gcc. > > You should be testing such changes by full bootstrap/regtest. I checked in r205866 to restore bootstrap. >> gcc/ChangeLog: >> * gcc/cgraph.h (

Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread Jakub Jelinek
On Mon, Dec 09, 2013 at 08:49:59PM +0100, Oleg Endo wrote: > Tested with make all-gcc. You should be testing such changes by full bootstrap/regtest. > gcc/ChangeLog: > * gcc/cgraph.h (cgraph_node_set_iterator, > varpool_node_set_iterator): Remove typedef. > (cgraph_inline_faile

Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread H.J. Lu
On Tue, Dec 10, 2013 at 9:33 AM, H.J. Lu wrote: > On Mon, Dec 9, 2013 at 11:49 AM, Oleg Endo wrote: >> On Thu, 2013-12-05 at 15:34 +0100, Oleg Endo wrote: >>> On Thu, 2013-12-05 at 14:56 +0100, Richard Biener wrote: >>> > >>> > grep for 'typedef struct.*{' in headers. The typedef name is usually

Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread H.J. Lu
On Mon, Dec 9, 2013 at 11:49 AM, Oleg Endo wrote: > On Thu, 2013-12-05 at 15:34 +0100, Oleg Endo wrote: >> On Thu, 2013-12-05 at 14:56 +0100, Richard Biener wrote: >> > >> > grep for 'typedef struct.*{' in headers. The typedef name is usually >> > the desired one and is used without 'struct'. So

Re: Remove some typedefs (was: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d))

2013-12-10 Thread Richard Biener
On Mon, Dec 9, 2013 at 8:49 PM, Oleg Endo wrote: > On Thu, 2013-12-05 at 15:34 +0100, Oleg Endo wrote: >> On Thu, 2013-12-05 at 14:56 +0100, Richard Biener wrote: >> > >> > grep for 'typedef struct.*{' in headers. The typedef name is usually >> > the desired one and is used without 'struct'. So

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-06 Thread Richard Biener
On Thu, Dec 5, 2013 at 3:34 PM, Oleg Endo wrote: > On Thu, 2013-12-05 at 14:56 +0100, Richard Biener wrote: >> > but they are used somewhere else. I could replace the uses of those >> > typedefs in a follow up patch, but for now I wanted to keep the changes >> > minimal. >> >> I didn't mean those

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Oleg Endo
On Thu, 2013-12-05 at 14:56 +0100, Richard Biener wrote: > > but they are used somewhere else. I could replace the uses of those > > typedefs in a follow up patch, but for now I wanted to keep the changes > > minimal. > > I didn't mean those cerating typedefs for the pointer type. > > >> and re

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Richard Biener
On Thu, Dec 5, 2013 at 12:41 PM, Oleg Endo wrote: > On Thu, 2013-12-05 at 12:21 +0100, Richard Biener wrote: >> On Thu, Dec 5, 2013 at 11:12 AM, Oleg Endo wrote: >> > On Thu, 2013-12-05 at 01:00 -0800, pins...@gmail.com wrote: >> >> >> >> >> >> No I don't think we want this at all. C++ is clear h

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Oleg Endo
On Thu, 2013-12-05 at 12:21 +0100, Richard Biener wrote: > On Thu, Dec 5, 2013 at 11:12 AM, Oleg Endo wrote: > > On Thu, 2013-12-05 at 01:00 -0800, pins...@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

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Richard Biener
On Thu, Dec 5, 2013 at 11:12 AM, Oleg Endo wrote: > On Thu, 2013-12-05 at 01:00 -0800, pins...@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 fla

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Oleg Endo
On Thu, 2013-12-05 at 01:00 -0800, pins...@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 w

Re: Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread pinskia
> On Dec 5, 2013, at 12:48 AM, Oleg Endo wrote: > > Hi, > > When building GCC on OSX with its native XCode/Clang tools, it outputs > quite some "struct X was previously declared as a class" or similar > warnings (-Wmismatched-tags is enabled by default). > > The attached patch fixes this for

Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

2013-12-05 Thread Oleg Endo
Hi, When building GCC on OSX with its native XCode/Clang tools, it outputs quite some "struct X was previously declared as a class" or similar warnings (-Wmismatched-tags is enabled by default). The attached patch fixes this for class opt_pass and class ipa_opt_pass_d by removing the redundant 's