This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/53524] [4.7/4.8 Regression] Bogus and unsupressable enum comparison warning


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53524

Jeffrey Yasskin <jyasskin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jyasskin at gcc dot gnu.org

--- Comment #2 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2012-05-30 02:25:26 UTC ---
I think Paul's arguing that you shouldn't warn on "test ? anon_enum_1 :
anon_enum_2". The result is defined by [expr.cond]p6 to be the common type of
the two enum types (often 'int'), and if the pattern is widely used, then it's
probably not a good idea to warn about it by default.

And, of course, it's always a bad idea to have a warning that users can't turn
off.

I haven't investigated what types PT1BitsAv and PT2BitsAv are supposed to have
before the enum is closed, but if they're the same as their initializers, then
the above argument holds.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]