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

--- Comment #36 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:55b7df8bfb12938e7716445d4e2dc0d2ddf44bac

commit r10-6157-g55b7df8bfb12938e7716445d4e2dc0d2ddf44bac
Author: Jason Merrill <ja...@redhat.com>
Date:   Wed Jan 22 14:21:06 2020 -0500

    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.

Reply via email to