> On Dec 5, 2013, at 12:48 AM, Oleg Endo <oleg.e...@t-online.de> 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 class opt_pass and class > ipa_opt_pass_d by removing the redundant 'struct' tag which seems to be > a leftover from the plain C days. > > Tested with make all-gcc. > OK for trunk?
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. Thanks, Andrew Pinski > > Cheers, > Oleg > > gcc/ChangeLog: > * cgraphunit.c: Remove struct tags when referring to class > ipa_opt_pass_d or class opt_pass. > * function.h: Likewise. > * lto-cgraph.c: Likewise. > * pass_manager.h: Likewise. > * passes.c: Likewise. > * tree-pass.h: Likewise. > <struct_opt_pass.patch>