Date: Sun, 12 Jan 2014 20:09:17 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260568 - in stable/10/contrib/gcc: . doc Message-ID: <201401122009.s0CK9H2r088733@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sun Jan 12 20:09:17 2014 New Revision: 260568 URL: http://svnweb.freebsd.org/changeset/base/260568 Log: MFC r259920: gcc: Implement -Wmost for compatibility with clang. This is equivalent to -Wall -Wno-parentheses. Obtained from: Apple GCC 4.2 - 5531 Modified: stable/10/contrib/gcc/c-opts.c stable/10/contrib/gcc/c.opt stable/10/contrib/gcc/doc/invoke.texi Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/c-opts.c ============================================================================== --- stable/10/contrib/gcc/c-opts.c Sun Jan 12 19:04:20 2014 (r260567) +++ stable/10/contrib/gcc/c-opts.c Sun Jan 12 20:09:17 2014 (r260568) @@ -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: stable/10/contrib/gcc/c.opt ============================================================================== --- stable/10/contrib/gcc/c.opt Sun Jan 12 19:04:20 2014 (r260567) +++ stable/10/contrib/gcc/c.opt Sun Jan 12 20:09:17 2014 (r260568) @@ -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: stable/10/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/10/contrib/gcc/doc/invoke.texi Sun Jan 12 19:04:20 2014 (r260567) +++ stable/10/contrib/gcc/doc/invoke.texi Sun Jan 12 20:09:17 2014 (r260568) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401122009.s0CK9H2r088733>