From owner-p4-projects@FreeBSD.ORG Fri Jul 11 02:47:07 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E92137B404; Fri, 11 Jul 2003 02:47:07 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF9BB37B401 for ; Fri, 11 Jul 2003 02:47:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92C5443F93 for ; Fri, 11 Jul 2003 02:47:06 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6B9l60U015262 for ; Fri, 11 Jul 2003 02:47:06 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6B9l6uW015259 for perforce@freebsd.org; Fri, 11 Jul 2003 02:47:06 -0700 (PDT) Date: Fri, 11 Jul 2003 02:47:06 -0700 (PDT) Message-Id: <200307110947.h6B9l6uW015259@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 34346 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2003 09:47:08 -0000 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;