Commit 5c8902bb by Richard Kenner

(lang_decode_option): Set warn_bad_function_cast for

-Wbad-function-cast.

From-SVN: r7561
parent add2167d
...@@ -466,6 +466,12 @@ int warn_write_strings; ...@@ -466,6 +466,12 @@ int warn_write_strings;
int warn_cast_qual; int warn_cast_qual;
/* Nonzero means warn when casting a function call to a type that does
not match the return type (e.g. (float)sqrt() or (anything*)malloc()
when there is no previous declaration of sqrt or malloc. */
int warn_bad_function_cast;
/* Warn about traditional constructs whose meanings changed in ANSI C. */ /* Warn about traditional constructs whose meanings changed in ANSI C. */
int warn_traditional; int warn_traditional;
...@@ -621,6 +627,10 @@ c_decode_option (p) ...@@ -621,6 +627,10 @@ c_decode_option (p)
warn_cast_qual = 1; warn_cast_qual = 1;
else if (!strcmp (p, "-Wno-cast-qual")) else if (!strcmp (p, "-Wno-cast-qual"))
warn_cast_qual = 0; warn_cast_qual = 0;
else if (!strcmp (p, "-Wbad-function-cast"))
warn_bad_function_cast = 1;
else if (!strcmp (p, "-Wno-bad-function-cast"))
warn_bad_function_cast = 0;
else if (!strcmp (p, "-Wpointer-arith")) else if (!strcmp (p, "-Wpointer-arith"))
warn_pointer_arith = 1; warn_pointer_arith = 1;
else if (!strcmp (p, "-Wno-pointer-arith")) else if (!strcmp (p, "-Wno-pointer-arith"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment