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/51712] -Wtype-limits should not trigger for types of implementation-defined signedness


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

--- Comment #5 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-04-17 21:27:25 UTC ---
(In reply to comment #4)
> I am not convinced clang's heuristic is the right one.  For example, the
> following code trips clang's warning, but the test is still not redundant. The

I can see that it doesn't handle this case, but it does handle two other common
cases we don't want to warn about, namely, arg >= FOO and when the zero comes
from a macro expansion.

In any case, at the moment of the warning, GCC doesn't  know that arg is an
enum, and avoid warning. But perhaps this case is easier to fix than the one
above.


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