diff options
author | Jason Merrill <jason@redhat.com> | 2020-01-22 14:21:06 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-01-22 17:05:43 -0500 |
commit | 55b7df8bfb12938e7716445d4e2dc0d2ddf44bac (patch) | |
tree | 92e64d32e8dc7e2491b7d52ef5e0c3b07ef197e1 /gcc/real.c | |
parent | d9637168812939d6c9df29ce747d8d4648b37cef (diff) | |
download | gcc-55b7df8bfb12938e7716445d4e2dc0d2ddf44bac.zip gcc-55b7df8bfb12938e7716445d4e2dc0d2ddf44bac.tar.gz gcc-55b7df8bfb12938e7716445d4e2dc0d2ddf44bac.tar.bz2 |
c-family: Fix problems with blender and PPC from PR 40752 patch.
blender in SPEC is built with -funsigned-char, which is also the default on
PPC, and exposed -Wsign-conversion issues that weren't seen by the x86_64
testsuite. In blender we were complaining about operands to an expression
that we didn't't previously complain about as a whole. So only check
operands after we check the whole expression. Also, to fix the PR 40752
testcases on -funsigned-char targets, don't consider -Wsign-conversion for
the second operand of PLUS_EXPR, especially since fold changes
"x - 5" to "x + (-5)". And don't use SCHAR_MAX with plain char.
PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
PR c++/40752
* c-warn.c (conversion_warning): Check operands only after checking
the whole expression. Don't check second operand of + for sign.
Diffstat (limited to 'gcc/real.c')
0 files changed, 0 insertions, 0 deletions