[Bug c++/40752] -Wconversion generates false warnings for operands not larger than target type
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 23 16:14:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752
--- Comment #37 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:
https://gcc.gnu.org/g:6d00f052ef209bacdd93f503b0c5fb428cc6c434
commit r10-6181-g6d00f052ef209bacdd93f503b0c5fb428cc6c434
Author: Jason Merrill <jason@redhat.com>
Date: Thu Jan 23 10:37:18 2020 -0500
c-family: One more 40752 tweak for unsigned char.
My last patch didn't fix all the failures on unsignd char targets. We were
missing one warning because by suppressing -Wsign-conversion for the second
operand of + we missed an overflow that we want to warn about, and we
properly don't warn about unsigned / or %.
PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
* c-warn.c (conversion_warning): Change -Wsign-conversion handling.
* lib/target-supports.exp (check_effective_target_unsigned_char):
New.
More information about the Gcc-bugs
mailing list