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/70477] -Wtautological-compare too aggressive?


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.

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