The define of the macro:
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
i test the macro as follow:
#include <stdio.h>
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof(( long)(e))))
#define true 1
int main() {
BUILD_BUG_ON_INVALID(true);
return 0;
}
and i compile it with:
gcc -Wall -Wextra -c test.c
but no warning(both true=0 and true=1)
The version of gcc is 11.4.0
New contributor
pluto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.