tags:

views:

36

answers:

2

Hi,

In a C program I get "passing argument ... from incompatible pointer type" warnings, however I want to get error and terminate compilation instead of warning.

What flag shall I set in makefile?

+1  A: 

If you are using gcc, add the -Werror flag.

nos
but I need only that type of warnings, not all
paul simmons
You can't select that only some warnings are treated as errors. It's all or nothing.
nos
A: 

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.

unwind