Open qnzhou opened 1 year ago
Describe the bug Catch2 triggers-Werror=parentheses on linux (gcc 9.3.1). Here is the error message:
-Werror=parentheses
_deps/catch2-src/src/catch2/internal/catch_test_macro_impl.hpp:57:67: error: suggest parentheses around comparison in operand of ‘==’ [-Werror=parentheses] 57 | catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \ _deps/catch2-src/src/catch2/catch_test_macros.hpp:125:26: note: in expansion of macro ‘INTERNAL_CATCH_TEST’ 125 | #define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) | ^~~~~~~~~~~~~~~~~~~
Expected behavior No warning should be produced.
Reproduction steps Any REQUIRE(x == y) will do.
REQUIRE(x == y)
Platform information:
Additional context This is related to https://github.com/catchorg/Catch2/issues/674, which is closed but not fixed.
I'm running into the same issue using GCC 8.4.0 on Ubuntu 20.04, with Catch v3.4.0.
Describe the bug Catch2 triggers
-Werror=parentheses
on linux (gcc 9.3.1). Here is the error message:Expected behavior No warning should be produced.
Reproduction steps Any
REQUIRE(x == y)
will do.Platform information:
Additional context This is related to https://github.com/catchorg/Catch2/issues/674, which is closed but not fixed.