diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-24 16:17:01 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-24 16:17:01 -0400 |
commit | 5c8902bb1a4e99e69a1d9daeae1165bc7abcbf76 (patch) | |
tree | a02c15b767eed5f5c883ba9526a0a87e32effaab /gcc | |
parent | add2167d64c449f3643ac7acf75c66a076ecda73 (diff) | |
download | gcc-5c8902bb1a4e99e69a1d9daeae1165bc7abcbf76.zip gcc-5c8902bb1a4e99e69a1d9daeae1165bc7abcbf76.tar.gz gcc-5c8902bb1a4e99e69a1d9daeae1165bc7abcbf76.tar.bz2 |
(lang_decode_option): Set warn_bad_function_cast for
-Wbad-function-cast.
From-SVN: r7561
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-decl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 680f226..901d0d9 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -466,6 +466,12 @@ int warn_write_strings; 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. */ int warn_traditional; @@ -621,6 +627,10 @@ c_decode_option (p) warn_cast_qual = 1; else if (!strcmp (p, "-Wno-cast-qual")) 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")) warn_pointer_arith = 1; else if (!strcmp (p, "-Wno-pointer-arith")) |