开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜