how to make gcc stop when there is a warning

D. Ensign densign@stanford.edu
Fri May 12 01:59:00 GMT 2006


I'm R'ing T' F'ing M' to try figure this out, but perhaps I can find the answer faster
just by asking.

I'm going through a bunch of C (sometimes Fortran 77) code and changing the type of
certain arrays, but of course I need to make absolutely sure that the functions that
recieve those arrays are expecting the right types.

Funny, but I find, "Warning: passing argument 3 of do_foo() from incompatible pointer
type" to be comforting, refreshing, and satisfying. It makes me feel warm and fuzzy
inside. Plus it tells me where I need to fix my code to get the calculations right.

As such, I'd like to tell gcc to quit when a warning is encountered (or even if a specific
warning is encountered). Is there a way to do this?

If it helps, I'm using gcc 4.0.2.

Attempts at aid, and heartless ridicule, will be most appreciated.

Dan

-- 
"Give up learning, and put an end to your troubles." -- Lao Tzu





More information about the Gcc mailing list