This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27975] warning for comparison of different enum types impossible to control/is undocumented
- From: "patrik dot hagglund at bredband dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2006 14:45:15 -0000
- Subject: [Bug c++/27975] warning for comparison of different enum types impossible to control/is undocumented
- References: <bug-27975-12684@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from patrik dot hagglund at bredband dot net 2006-06-10 14:45 -------
(In reply to comment #1)
> Why is this that bad of a warning,
I didn't said it was a bad warning per se (did I?). What I want to do is to be
able to prioritize between warnings to be able to cope with the overwhelming
number of warnings we get when we compile our code base with GCC. Right now
that warning is a bit down on the list. What I request is an way to turn on
-Werror _before_ we have fixed all those warings.
> really it could prove useful to make sure
> that you don't end up with always true comparisons because enums are not the
> same as their under lieing type in C++.
I don't follow you exacly. Do you mean that the range of two enums may imply
that a comparison may be statically deduced, but GCC is unable to detect that?
If that is the purpose of the warning, then this warning will give a lot of
false positives on our code. However, it may nevertheless be useful for us.
Later.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27975