From owner-svn-src-stable@FreeBSD.ORG Fri Jan 31 03:30:10 2014 Return-Path: Delivered-To: svn-src-stable@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 9B8AF1E3; Fri, 31 Jan 2014 03:30:10 +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 870F11366; Fri, 31 Jan 2014 03:30:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0V3UAPk084378; Fri, 31 Jan 2014 03:30:10 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0V3U9nb084375; Fri, 31 Jan 2014 03:30:09 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201401310330.s0V3U9nb084375@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 31 Jan 2014 03:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261306 - in stable/10/contrib/gcc: . cp doc X-SVN-Group: stable-10 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: Fri, 31 Jan 2014 03:30:10 -0000 Author: pfg Date: Fri Jan 31 03:30:09 2014 New Revision: 261306 URL: http://svnweb.freebsd.org/changeset/base/261306 Log: MFC r261178: gcc: Add support for -Wmissing-prototypes in C++ Support for warnings about missing prototypes in C++ was added by Apple GCC (Radar 6261539). Most of the code crept into r260311 so it felt natural to make use of it. Obtained from: Apple GCC - 5646 Modified: stable/10/contrib/gcc/c.opt stable/10/contrib/gcc/cp/decl.c stable/10/contrib/gcc/doc/invoke.texi Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcc/c.opt ============================================================================== --- stable/10/contrib/gcc/c.opt Fri Jan 31 01:34:55 2014 (r261305) +++ stable/10/contrib/gcc/c.opt Fri Jan 31 03:30:09 2014 (r261306) @@ -280,9 +280,11 @@ Wmissing-include-dirs C ObjC C++ ObjC++ Warn about user-specified include directories that do not exist +; APPLE LOCAL begin warn missing prototype 6261539 Wmissing-prototypes -C ObjC Var(warn_missing_prototypes) +C ObjC C++ ObjC++ Var(warn_missing_prototypes) Warn about global functions without prototypes +; APPLE LOCAL end warn missing prototype 6261539 ; APPLE LOCAL begin -Wmost Wmost Modified: stable/10/contrib/gcc/cp/decl.c ============================================================================== --- stable/10/contrib/gcc/cp/decl.c Fri Jan 31 01:34:55 2014 (r261305) +++ stable/10/contrib/gcc/cp/decl.c Fri Jan 31 03:30:09 2014 (r261306) @@ -11486,6 +11486,10 @@ start_function (cp_decl_specifier_seq *d gcc_assert (same_type_p (TREE_TYPE (TREE_TYPE (decl1)), integer_type_node)); + /* APPLE LOCAL begin warn missing prototype 6261539 */ + check_missing_prototype (decl1); + /* APPLE LOCAL end warn missing prototype 6261539 */ + start_preparsed_function (decl1, attrs, /*flags=*/SF_DEFAULT); return 1; Modified: stable/10/contrib/gcc/doc/invoke.texi ============================================================================== --- stable/10/contrib/gcc/doc/invoke.texi Fri Jan 31 01:34:55 2014 (r261305) +++ stable/10/contrib/gcc/doc/invoke.texi Fri Jan 31 03:30:09 2014 (r261306) @@ -225,6 +225,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 warn missing prototype 6261539 +-Wmissing-prototypes @gol @c APPLE LOCAL -Wmost -Wmost (APPLE ONLY) @gol -Wno-multichar -Wnonnull -Wno-overflow @gol @@ -245,7 +247,8 @@ in the following sections. @item C-only Warning Options @gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol --Wmissing-prototypes -Wnested-externs -Wold-style-definition @gol +@c APPLE LOCAL warn missing prototype 6261539 +-Wnested-externs -Wold-style-definition @gol -Wstrict-prototypes -Wtraditional @gol -Wdeclaration-after-statement -Wpointer-sign} @@ -3052,7 +3055,8 @@ types.) Warn if an old-style function definition is used. A warning is given even if there is a previous prototype. -@item -Wmissing-prototypes @r{(C only)} +@c APPLE LOCAL warn missing prototype 6261539 +@item -Wmissing-prototypes @opindex Wmissing-prototypes Warn if a global function is defined without a previous prototype declaration. This warning is issued even if the definition itself