From owner-svn-src-stable@FreeBSD.ORG Sun Jan 12 20:10:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3926878D; Sun, 12 Jan 2014 20:10:14 +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 243A01DD6; Sun, 12 Jan 2014 20:10:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0CKAEHi089245; Sun, 12 Jan 2014 20:10:14 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0CKADJZ089240; Sun, 12 Jan 2014 20:10:13 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401122010.s0CKADJZ089240@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 12 Jan 2014 20:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r260569 - in stable/9: contrib/gcc contrib/gcc/doc sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jan 2014 20:10:14 -0000 Author: pfg Date: Sun Jan 12 20:10:12 2014 New Revision: 260569 URL: http://svnweb.freebsd.org/changeset/base/260569 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/9/contrib/gcc/c-opts.c stable/9/contrib/gcc/c.opt stable/9/contrib/gcc/doc/invoke.texi stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Directory Properties: stable/9/ (props changed) stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/c-opts.c ============================================================================== --- stable/9/contrib/gcc/c-opts.c Sun Jan 12 20:09:17 2014 (r260568) +++ stable/9/contrib/gcc/c-opts.c Sun Jan 12 20:10:12 2014 (r260569) @@ -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/9/contrib/gcc/c.opt ============================================================================== --- stable/9/contrib/gcc/c.opt Sun Jan 12 20:09:17 2014 (r260568) +++ stable/9/contrib/gcc/c.opt Sun Jan 12 20:10:12 2014 (r260569) @@ -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/9/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/9/contrib/gcc/doc/invoke.texi Sun Jan 12 20:09:17 2014 (r260568) +++ stable/9/contrib/gcc/doc/invoke.texi Sun Jan 12 20:10:12 2014 (r260569) @@ -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 Modified: stable/9/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jan 12 20:09:17 2014 (r260568) +++ stable/9/sys/fs/ext2fs/ext2_inode_cnv.c Sun Jan 12 20:10:12 2014 (r260569) @@ -104,7 +104,7 @@ ext2_ei2i(struct ext2fs_dinode *ei, stru ip->i_birthtime = ei->e2di_crtime; ip->i_birthnsec = XTIME_TO_NSEC(ei->e2di_crtime_extra); } - ip->i_flags = ei->e2di_flags; + ip->i_flags = 0; ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0; ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; ip->i_flags |= (ei->e2di_flags & EXT2_NODUMP) ? UF_NODUMP : 0; @@ -152,7 +152,7 @@ ext2_i2ei(struct inode *ip, struct ext2f ei->e2di_crtime = ip->i_birthtime; ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); } - ei->e2di_flags = ip->i_flags; + ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; ei->e2di_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE: 0; ei->e2di_flags |= (ip->i_flags & UF_NODUMP) ? EXT2_NODUMP: 0;