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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org
            Summary|Warn about signed module    |Warn about signed modulo
                   |that is converted to        |that is converted to
                   |unsigned value              |unsigned value

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
There already is a warning from -Wsign-conversion for it:

$ /usr/local/bin/gcc -c -Wall -Wextra -Wconversion  96460.c
96460.c: In function 'f2':
96460.c:4:12: warning: conversion to 'long unsigned int' from 'int' may change
the sign of the result [-Wsign-conversion]
    4 |   return i % 16;
      |          ~~^~~~
$

Reply via email to