c-family: One more 40752 tweak for unsigned char.
authorJason Merrill <jason@redhat.com>
Thu, 23 Jan 2020 15:37:18 +0000 (10:37 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 23 Jan 2020 16:13:48 +0000 (11:13 -0500)
commit6d00f052ef209bacdd93f503b0c5fb428cc6c434
tree8cb9fb9702cb52b019574cf007b9d8da7ad48c20
parent54b3d52c3cca836c7c4c08cc9c02eda6c096372a
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.
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wconversion-pr40752a.c
gcc/testsuite/lib/target-supports.exp