From owner-svn-src-all@freebsd.org Wed Nov 29 21:16:15 2017 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 995A3DEA0D7; Wed, 29 Nov 2017 21:16:15 +0000 (UTC) (envelope-from arichardson@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 62BD765062; Wed, 29 Nov 2017 21:16:15 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vATLGEk6091743; Wed, 29 Nov 2017 21:16:14 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vATLGEB2091742; Wed, 29 Nov 2017 21:16:14 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201711292116.vATLGEB2091742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Wed, 29 Nov 2017 21:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326375 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 326375 X-SVN-Commit-Repository: base 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.25 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: Wed, 29 Nov 2017 21:16:15 -0000 Author: arichardson Date: Wed Nov 29 21:16:14 2017 New Revision: 326375 URL: https://svnweb.freebsd.org/changeset/base/326375 Log: Don't fail the build due to clang integer constant range warnings This warning checks whether a constant is out of range of the integer type. An example is `comparison of 'u_int' > 4294967295 is always false` and in this case the warning makes sense. However, when the type is a typedef that can be either 64 or 32 bits the if condition is only tautological in some configurations so this should not be a warning that fails the build. Reviewed by: dim Approved by: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D12912 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Wed Nov 29 20:44:40 2017 (r326374) +++ head/share/mk/bsd.sys.mk Wed Nov 29 21:16:14 2017 (r326375) @@ -81,6 +81,9 @@ CWARNFLAGS.clang+= -Wno-unused-local-typedef .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 40000 CWARNFLAGS.clang+= -Wno-address-of-packed-member .endif +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000 +CWARNFLAGS.clang+= -Wno-error=tautological-constant-compare +.endif .endif # WARNS <= 3 .if ${WARNS} <= 2 CWARNFLAGS.clang+= -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter