https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
Ladislav Michl <la...@linux-mips.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |la...@linux-mips.org --- Comment #6 from Ladislav Michl <la...@linux-mips.org> --- Created attachment 46391 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46391&action=edit Ternary if That ternary operator makes warning disappear. In the testcase 'gcc -Woverflow -o x x.c' gives: x.c:14:9: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘1000’ to ‘232’ [-Woverflow] baz = 1000; ^~~~ x.c:16:9: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘2000’ to ‘208’ [-Woverflow] baz = 2000; ^~~~ while 'gcc -DNO -Woverflow -o x x.c' silently ignores overflow. I would welcome any advice, how o properly categorize this bug, so eventually new bugreport will be created. Thank you.