Date: Fri, 11 Jul 2003 02:47:06 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 34346 for review Message-ID: <200307110947.h6B9l6uW015259@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=34346 Change 34346 by marcel@marcel_nfs on 2003/07/11 02:46:09 Add -W[no-]bad-pointer-cast and -Werror-bad-pointer-cast to the mix of options. This used to be in c-decl.c, but the whole option handling has been changed. At 2:45am, one does not test anymore. Just so you know... Affected files ... .. //depot/projects/ia64/contrib/gcc/c-opts.c#2 edit Differences ... ==== //depot/projects/ia64/contrib/gcc/c-opts.c#2 (text+ko) ==== @@ -127,6 +127,7 @@ OPT("Wabi", CL_CXX, OPT_Wabi) \ OPT("Wall", CL_ALL, OPT_Wall) \ OPT("Wbad-function-cast", CL_C, OPT_Wbad_function_cast) \ + OPT("Wbad-pointer-cast", CL_C, OPT_Wbad_pointer_cast) \ OPT("Wcast-qual", CL_ALL, OPT_Wcast_qual) \ OPT("Wchar-subscripts", CL_ALL, OPT_Wchar_subscripts) \ OPT("Wcomment", CL_ALL, OPT_Wcomment) \ @@ -138,6 +139,7 @@ OPT("Weffc++", CL_CXX, OPT_Weffcxx) \ OPT("Wendif-labels", CL_ALL, OPT_Wendif_labels) \ OPT("Werror", CL_ALL, OPT_Werror) \ + OPT("Werror-bad-pointer-cast",CL_C, OPT_Werror_bad_pointer_cast) \ OPT("Werror-implicit-function-declaration", \ CL_C, OPT_Werror_implicit_function_decl) \ OPT("Wfloat-equal", CL_ALL, OPT_Wfloat_equal) \ @@ -737,6 +739,10 @@ warn_bad_function_cast = on; break; + case OPT_Wbad_pointer_cast: + mesg_bad_pointer_cast = on; + break; + case OPT_Wcast_qual: warn_cast_qual = on; break; @@ -778,6 +784,13 @@ cpp_opts->warnings_are_errors = on; break; + case OPT_Werror_bad_pointer_cast: + if (!on) + result = 0; + else + mesg_bad_pointer_cast = 2; + break; + case OPT_Werror_implicit_function_decl: if (!on) result = 0;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307110947.h6B9l6uW015259>
