get error instead of incompatible pointer type warning
In a C program I get "passing argument ... from incompatible pointer type" warnings, however I want to ge开发者_运维技巧t error and terminate compilation instead of warning.
What flag shall I set in makefile?
If using gcc, I think the option combination you need is -fstrict-aliasing -Wstrict-aliasing=3 -Werror=strict-aliasing
. See this text for documentation of the strict-aliasing
option.
If you are using gcc, add the -Werror
flag.
I had the same question. The suggestions above didn't work something which comes closer is
gcc -Werror -Wno-error=all
精彩评论