From owner-svn-src-all@freebsd.org Fri May 27 03:40:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0607B4C542; Fri, 27 May 2016 03:40:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 851CF108B; Fri, 27 May 2016 03:40:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4R3eqkt067839; Fri, 27 May 2016 03:40:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4R3eqE5067837; Fri, 27 May 2016 03:40:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201605270340.u4R3eqE5067837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 27 May 2016 03:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300822 - in head: contrib/gcc gnu/usr.bin/cc/cc_tools 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.22 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: Fri, 27 May 2016 03:40:53 -0000 Author: cem Date: Fri May 27 03:40:52 2016 New Revision: 300822 URL: https://svnweb.freebsd.org/changeset/base/300822 Log: gcc42: Fix minor C99 parse bug DR #289[0] came down and gcc4.2.1 was on the wrong side of history. Partially revert GCC r42574 (just remove the error) to rectify the parse bug to match Clang and other compliant C99 compilers. An example declaration gcc tripped on before this fix: void foobar(int [static 1]); An example declaration gcc did not trip on before this fix: void foobar(int name[static 1]); Bump __FreeBSD_cc_version. [0]: http://www.open-std.org/JTC1/SC22/WG14/www/docs/dr_289.htm Reported by: allanjude Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/gcc/c-decl.c head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/contrib/gcc/c-decl.c ============================================================================== --- head/contrib/gcc/c-decl.c Fri May 27 03:30:42 2016 (r300821) +++ head/contrib/gcc/c-decl.c Fri May 27 03:40:52 2016 (r300822) @@ -3150,20 +3150,14 @@ build_array_declarator (tree expr, struc /* Set the contained declarator of an array declarator. DECL is the declarator, as constructed by build_array_declarator; INNER is what - appears on the left of the []. ABSTRACT_P is true if it is an - abstract declarator, false otherwise; this is used to reject static - and type qualifiers in abstract declarators, where they are not in - the C99 grammar (subject to possible change in DR#289). */ + appears on the left of the []. */ struct c_declarator * set_array_declarator_inner (struct c_declarator *decl, - struct c_declarator *inner, bool abstract_p) + struct c_declarator *inner, + bool abstract_p __attribute__ ((__unused__))) { decl->declarator = inner; - if (abstract_p && (decl->u.array.quals != TYPE_UNQUALIFIED - || decl->u.array.attrs != NULL_TREE - || decl->u.array.static_p)) - error ("static or type qualifiers in abstract declarator"); return decl; } Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri May 27 03:30:42 2016 (r300821) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Fri May 27 03:40:52 2016 (r300822) @@ -8,7 +8,7 @@ /* Fake out gcc/config/freebsd.h. */ #define FBSD_MAJOR 11 -#define FBSD_CC_VER 1100001 /* form like __FreeBSD_version */ +#define FBSD_CC_VER 1100002 /* form like __FreeBSD_version */ #undef SYSTEM_INCLUDE_DIR /* We don't need one for now. */ #undef TOOL_INCLUDE_DIR /* We don't need one for now. */