You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gcc -std=gnu11 -Wall -Wextra -pedantic src-test/main.c
In file included from src-test/main.c:1:
src-test/main.c: In function ‘utest_run_Utest_sign_compare’:
src-test/utest.h:828:42: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
828 | #define ASSERT_EQ(x, y) UTEST_COND(x, y, ==, "", 1)
| ^~
src-test/utest.h:783:18: note: in definition of macro ‘UTEST_COND’
783 | if (!((xEval)cond(yEval))) { \
| ^~~~
src-test/main.c:17:9: note: in expansion of macro ‘ASSERT_EQ’
17 | ASSERT_EQ(MY_ENUM_A, e);
| ^~~~~~~~~
This was surprising to me. Note that an explicit cast of the variable e to int compiles without warning. GCC version 12.2.0.
The text was updated successfully, but these errors were encountered:
Reproducer:
Compilation:
This was surprising to me. Note that an explicit cast of the variable
e
toint
compiles without warning. GCC version 12.2.0.The text was updated successfully, but these errors were encountered: