[Bug c++/62181] [C/C++] Expected new warning: "adding 'char' to a string does not append to the string" [-Wstring-plus-int]
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 13 00:34:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62181
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
In both FEs there is a function build_binary_op. Put a break-point inside,
examine the operands with debug_tree and figure out how to detect this case and
when to warn. Add the new warning option to c-family/c.opt and document it in
gcc/doc/invoke.texi.
I think the note is useful but we cannot give the fix-it hints yet. Add a FIXME
in the code on top of the inform call.
More information about the Gcc-bugs
mailing list