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++/27975] warning for comparison of different enum types impossible to control/is undocumented



------- 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


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