PERFORCE change 34346 for review
Marcel Moolenaar
marcel at FreeBSD.org
Fri Jul 11 02:47:08 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=34346
Change 34346 by marcel at 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;
More information about the p4-projects
mailing list