Silence class vs. struct warnings (opt_pass, ipa_opt_pass_d)

Oleg Endo oleg.endo@t-online.de
Thu Dec 5 08:48:00 GMT 2013


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?

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: struct_opt_pass.patch
Type: text/x-patch
Size: 16681 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131205/b9289ca2/attachment.bin>


More information about the Gcc-patches mailing list