[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #10 from Marc Glisse --- I still think some __attribute__((exhaustive)) on an enum definition would be useful for this sort of thing.

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #9 from Martin Liška --- (In reply to Andrew Pinski from comment #8) > (In reply to Martin Liška from comment #7) > > in switch statements, we have a huge patch: > >

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-25 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #8 from Andrew Pinski --- (In reply to Martin Liška from comment #7) > in switch statements, we have a huge patch: > https://build.opensuse.org/package/view_file/network:chromium/chromium-beta/ >

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 Martin Liška changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org ---

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #5 from Jonathan Wakely --- (In reply to Martin Liška from comment #0) > Issues is that: > > 14746/* If -fstrict-enums, still constrain TYPE_MIN/MAX_VALUE. */ > 14747if (flag_strict_enums) > 14748

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #4 from Marc Glisse --- Would it make sense to have an attribute so this can be specified for each enum, instead of globally?

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #3 from Richard Biener --- Indeed, at least we shouldn't change the middle-end representation. The FE can of course warn more strictly if the language allows.

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 --- Comment #2 from Martin Liška --- (In reply to Andrew Pinski from comment #1) > Well the documentation says this: > basically, a value that can be represented in the minimum number of bits > needed to represent all the enumerators > > So if

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement --- Comment #1 from Andrew

[Bug c++/89450] RFC: Strengthen -fstrict-enums

2019-02-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89450 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|