From owner-svn-src-all@FreeBSD.ORG Fri Dec 16 23:42:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD525106564A; Fri, 16 Dec 2011 23:42:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCBFC8FC12; Fri, 16 Dec 2011 23:42:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBGNgPYB032610; Fri, 16 Dec 2011 23:42:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBGNgPil032608; Fri, 16 Dec 2011 23:42:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112162342.pBGNgPil032608@svn.freebsd.org> From: Dimitry Andric Date: Fri, 16 Dec 2011 23:42:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228606 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 16 Dec 2011 23:42:26 -0000 Author: dim Date: Fri Dec 16 23:42:25 2011 New Revision: 228606 URL: http://svn.freebsd.org/changeset/base/228606 Log: Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang, to selectively work around warnings in programs that don't use flexible array members, but instead define arrays of length 1 at the end of the struct, and then access those beyond their declared bounds. MFC after: 1 week Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Dec 16 23:40:56 2011 (r228605) +++ head/share/mk/bsd.sys.mk Fri Dec 16 23:42:25 2011 (r228606) @@ -70,6 +70,9 @@ CWARNFLAGS += -Wno-switch-enum . if ${WARNS} <= 1 CWARNFLAGS += -Wno-parentheses . endif +. if defined(NO_WARRAY_BOUNDS) +CWARNFLAGS += -Wno-array-bounds +. endif . endif . endif