[Bug c++/80151] Add a warning to catch implicit string to bool conversion (-Wstring-conversion)

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 30 13:35:17 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80151

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
A godbolt link is not a clear explanation of what behaviour you want from a new
warning. That shows precisely one case. Is that the only case that should warn?

Again:

If you want a new warning for those cases, it needs to be properly described to
say when it should warn *and when it should not*, to avoid unhelpful warnings
for the cases like comment 5 and comment 7.


More information about the Gcc-bugs mailing list