From owner-svn-src-all@FreeBSD.ORG Thu Dec 26 18:09:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3CD36BA; Thu, 26 Dec 2013 18:09:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A43F11595; Thu, 26 Dec 2013 18:09:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBQI9HFc007544; Thu, 26 Dec 2013 18:09:17 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBQI9Hbb007540; Thu, 26 Dec 2013 18:09:17 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312261809.rBQI9Hbb007540@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 26 Dec 2013 18:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259920 - in head/contrib/gcc: . doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Dec 2013 18:09:17 -0000 Author: pfg Date: Thu Dec 26 18:09:16 2013 New Revision: 259920 URL: http://svnweb.freebsd.org/changeset/base/259920 Log: gcc: Implement -Wmost for compatibility with clang. This is equivalent to -Wall -Wno-parentheses. Obtained from: Apple GCC 4.2 - 5531 MFC after: 1 week Modified: head/contrib/gcc/c-opts.c head/contrib/gcc/c.opt head/contrib/gcc/doc/invoke.texi Modified: head/contrib/gcc/c-opts.c ============================================================================== --- head/contrib/gcc/c-opts.c Thu Dec 26 16:59:50 2013 (r259919) +++ head/contrib/gcc/c-opts.c Thu Dec 26 18:09:16 2013 (r259920) @@ -385,12 +385,17 @@ c_common_handle_option (size_t scode, co break; case OPT_Wall: + /* APPLE LOCAL -Wmost */ + case OPT_Wmost: set_Wunused (value); set_Wformat (value); set_Wimplicit (value); warn_char_subscripts = value; warn_missing_braces = value; - warn_parentheses = value; + /* APPLE LOCAL begin -Wmost --dpatel */ + if (code != OPT_Wmost) + warn_parentheses = value; + /* APPLE LOCAL end -Wmost --dpatel */ warn_return_type = value; warn_sequence_point = value; /* Was C only. */ if (c_dialect_cxx ()) Modified: head/contrib/gcc/c.opt ============================================================================== --- head/contrib/gcc/c.opt Thu Dec 26 16:59:50 2013 (r259919) +++ head/contrib/gcc/c.opt Thu Dec 26 18:09:16 2013 (r259920) @@ -284,6 +284,12 @@ Wmissing-prototypes C ObjC Var(warn_missing_prototypes) Warn about global functions without prototypes +; APPLE LOCAL begin -Wmost +Wmost +C ObjC C++ ObjC++ +Like -Wall but without -Wparentheses +; APPLE LOCAL end -Wmost + Wmultichar C ObjC C++ ObjC++ Warn about use of multi-character character constants Modified: head/contrib/gcc/doc/invoke.texi ============================================================================== --- head/contrib/gcc/doc/invoke.texi Thu Dec 26 16:59:50 2013 (r259919) +++ head/contrib/gcc/doc/invoke.texi Thu Dec 26 18:09:16 2013 (r259920) @@ -222,6 +222,8 @@ in the following sections. -Wmain -Wmissing-braces -Wmissing-field-initializers @gol -Wmissing-format-attribute -Wmissing-include-dirs @gol -Wmissing-noreturn @gol +@c APPLE LOCAL -Wmost +-Wmost (APPLE ONLY) @gol -Wno-multichar -Wnonnull -Wno-overflow @gol -Woverlength-strings -Wpacked -Wpadded @gol -Wparentheses -Wpointer-arith -Wno-pointer-to-int-cast @gol @@ -2652,7 +2654,12 @@ warnings about constructions that some u that are easy to avoid (or modify to prevent the warning), even in conjunction with macros. This also enables some language-specific warnings described in @ref{C++ Dialect Options}. +@c APPLE LOCAL begin -Wmost +@item -Wmost +@opindex Wmost +This is equivalent to -Wall -Wno-parentheses. (Apple compatible) @end table +@c APPLE LOCAL end -Wmost The following @option{-W@dots{}} options are not implied by @option{-Wall}. Some of them warn about constructions that users generally do not