[Bug c++/87292] Warnings with Bit Fields

2018-12-13 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/87292] Warnings with Bit Fields

2018-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/87292] Warnings with Bit Fields

2018-09-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 --- Comment #5 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #1) > I think the second is correct but I dont know the exact rules about enum > classes; are they unsigned by default? No, the default underlying type is 'int'

[Bug c++/87292] Warnings with Bit Fields

2018-09-13 Thread nunojpg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 --- Comment #4 from Nuno Gonçalves --- I found that the issue with enum have been extensively debated at #61414. Sorry. So actually this bug report is only regarding the warning with initializer list: struct{ uint8_t c1:6; u

[Bug c++/87292] Warnings with Bit Fields

2018-09-12 Thread nunojpg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 --- Comment #3 from Nuno Gonçalves --- Also to add, this could be suppressed if enum class Bool : bool{False=0, True=1}; So a better example is for a 2 bit BitField: enum class Nr : uint8_t{Zero=0, One=1, Two=2, Three=3}; struct{ Nr v:2;

[Bug c++/87292] Warnings with Bit Fields

2018-09-12 Thread nunojpg at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 --- Comment #2 from Nuno Gonçalves --- Not the case since, same warning if: enum class Bool : uint8_t {False=0, True=1}

[Bug c++/87292] Warnings with Bit Fields

2018-09-12 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87292 --- Comment #1 from Andrew Pinski --- I think the second is correct but I dont know the exact rules about enum classes; are they unsigned by default? I know normal emuns are signed by default.