This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70477] -Wtautological-compare too aggressive?
- From: "s at ecloud dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jun 2016 12:09:06 +0000
- Subject: [Bug c/70477] -Wtautological-compare too aggressive?
- Auto-submitted: auto-generated
- References: <bug-70477-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70477
ecloud <s at ecloud dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |s at ecloud dot org
--- Comment #5 from ecloud <s at ecloud dot org> ---
>From my perspective it looks like https://bugreports.qt.io/browse/QTBUG-53373
is also a case of -Wtautological-compare being too aggressive too; but I'm not
an expert on that code, and it might turn out that someone comes up with some
solution other than disabling the warning.
If a macro exists in order to test something and generate different code
depending on the test result, then in any given use case of the macro, we can
say that the test inside the macro is a tautology, right? But that shouldn't
mean that doing tests inside macros is bad.