From owner-svn-src-head@FreeBSD.ORG Fri Oct 10 00:35:14 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD24E822; Fri, 10 Oct 2014 00:35: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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B90A335A; Fri, 10 Oct 2014 00:35:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9A0ZEsQ011137; Fri, 10 Oct 2014 00:35:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A0ZE5n011135; Fri, 10 Oct 2014 00:35:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201410100035.s9A0ZE5n011135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 10 Oct 2014 00:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272881 - in head/sys: conf sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 00:35:14 -0000 Author: imp Date: Fri Oct 10 00:35:13 2014 New Revision: 272881 URL: https://svnweb.freebsd.org/changeset/base/272881 Log: For gcc 4.6 and newer, _Static_assert is a keyword, so don't try to redefine it. It does what we want, and is always available unlike other alternatives. Modified: head/sys/conf/kern.mk head/sys/sys/cdefs.h Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Oct 10 00:35:08 2014 (r272880) +++ head/sys/conf/kern.mk Fri Oct 10 00:35:13 2014 (r272881) @@ -38,7 +38,7 @@ CWARNEXTRA?= -Wno-error-tautological-com # building with gcc 4.8 and newer. Nothing older has been tested. CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ - -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Oct 10 00:35:08 2014 (r272880) +++ head/sys/sys/cdefs.h Fri Oct 10 00:35:13 2014 (r272881) @@ -288,6 +288,8 @@ #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) +#elif __GNUC_PREREQ__(4,6) +/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y)