开发者

get error instead of incompatible pointer type warning

开发者 https://www.devze.com 2022-12-20 18:05 出处:网络
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.

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

精彩评论

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

关注公众号