[Bug c/83151] Explicit unsigned bitfields are treated as signed ones

2017-11-25 Thread lh_mouse at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83151 --- Comment #4 from Liu Hao --- I do care about these warnings and that is why these warnings are enabled. However the one in the original post seems nothing but false positive to me. I know what the standard says about integer promotion (when

[Bug c/83151] Explicit unsigned bitfields are treated as signed ones

2017-11-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83151 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug c/83151] Explicit unsigned bitfields are treated as signed ones

2017-11-25 Thread lh_mouse at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83151 Liu Hao changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/83151] Explicit unsigned bitfields are treated as signed ones

2017-11-25 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83151 --- Comment #1 from Andreas Schwab --- The operand of ~ is promoted to int first, thus the type of the result is also int which is then implicitly converted to unsigned int on return.