On 10/20/2015 04:00 PM, Joseph Myers wrote:
On Tue, 20 Oct 2015, Jeff Law wrote:

2015-10-20  Eric Botcazou  <ebotca...@adacore.com>

        * fold-const.c (tree_binary_nonnegative_warnv_p) <FLOOR_MOD_EXPR>:
        Recurse on operand #1 instead of operand #0.
        <CEIL_MOD_EXPR>: Do not recurse.
        <ROUND_MOD_EXPR>: Likewise.
Isn't this a function of the language and in some cases isn't it
implementation defined (true for C/C++ until C++11)?

The language determines *which* *_DIV_EXPR or *_MOD_EXPR is used.  The
semantics of each of them should be language-independent.
You're, of course, correct.

So the only question is whether or not the CEIL_MOD_EXPR and ROUND_MOD_EXPR bits are right. I'm confident the change to FLOOR_MOD_EXPR is right.

Do we have any reasonable way to test CEIL_MOD_EXPR & ROUND_MOD_EXPR?

Jeff

Reply via email to