On Sat, Aug 17, 2024 at 05:03:14AM +0000, Li, Pan2 wrote:
> Thanks Richard for confirmation. Sorry almost forget this thread.
> 
> Please feel free to let me know if there is anything I can do to fix this 
> issue. Thanks a lot.

There is no bug.  The operands of .{ADD,SUB,MUL}_OVERFLOW don't have to
have the same type, as described in the
__builtin_{add,sub,mul}_overflow{,_p} documentation, each argument can have
different type and result yet another one, the behavior is then (as if) to
perform the operation in infinite precision and if that result fits into
the result type, there is no overflow, otherwise there is.
So, there is no need to promote anything, promoted constants would have the
same value as the non-promoted ones and the value is all that matters for
constants.

        Jakub

Reply via email to