For example if we have:
const bool kFalseConstant = false;
EXPECT_EQ(kFalseConstant, foo());
GCC 4.7 will issue the following warning:
converting 'false' to pointer type for argument 1 of 'char
testing::internal::IsNullLiteralHelper(testing::internal::Secret*)'
We are using the following workaround in Chromium:
EXPECT_TRUE(kFalseConstant == foo());
Though I'm not sure if it the expected behavior to consider kFalseConstant as
compatible to null pointer. (why EXPECT_EQ has to check that anyway?) It may be
a bug or not.
Original issue reported on code.google.com by trc...@chromium.org on 16 May 2014 at 11:38
Original issue reported on code.google.com by
trc...@chromium.org
on 16 May 2014 at 11:38