Last week I committed a patch to check for enum comparisons which are
invalid in C++.  Today I committed a patch to check for enum conversions
during function calls which are invalid in C++.  These new warnings are
enabled by -Wc++-compat.

I have not fixed every gcc backend to compile without producing any of
the new warnings.  I have fixed some: arm, i386, ia64, mips, pa, rs6000,
s390, sparc, spu.  This covers all the primary and secondary platforms,
plus spu which I had to touch because I changed a target vector which it
implements.

Adding these warnings to -Wc++-compat may break bootstrap for other
platforms, and may cause additional warnings when building
cross-compilers.  I would like to ask the maintainers for backends which
I did not mention to bootstrap their targets if possible, and/or to
build them with a newly built mainline compiler, to see if there are new
warnings about C++ compatibility.  These warnings are normally
straightforward to fix.  For warnings related to calling
gen_rtx_EXPR_LIST to add a register note, change the code to use the
add_reg_note function instead.

I am willing to help fix any backends which have trouble with the new
warnings.  However, I do not plan to build every backend myself.

There will be some more improvements to -Wc++-compat coming, causing
more warnings on existing gcc code, and I plan to follow this same
procedure.

Ian

Reply via email to