From owner-freebsd-toolchain@FreeBSD.ORG Thu Nov 3 15:11:06 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD7E0106566C; Thu, 3 Nov 2011 15:11:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 80C918FC0C; Thu, 3 Nov 2011 15:11:05 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:e9f1:c2dd:1955:9aa2] (unknown [IPv6:2001:7b8:3a7:0:e9f1:c2dd:1955:9aa2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4C8965C37; Thu, 3 Nov 2011 16:11:04 +0100 (CET) Message-ID: <4EB2AF08.9010806@FreeBSD.org> Date: Thu, 03 Nov 2011 16:11:04 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111031 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Best References: <20111103104523.GA30132@freebsd.org> In-Reply-To: <20111103104523.GA30132@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-toolchain@freebsd.org Subject: Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2011 15:11:06 -0000 On 2011-11-03 11:45, Alexander Best wrote: ... > /usr/git-freebsd-head/sys/dev/ath/ath_hal/ar5210/ar5210_power.c:36:3: warning: signed shift result (0x200000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] > OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_SLE, AR_SCR_SLE_ALLOW); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/git-freebsd-head/sys/dev/ath/ath_hal/ah_internal.h:471:42: note: expanded from macro 'OS_REG_RMW_FIELD' > (OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f))) > ^ > /usr/git-freebsd-head/sys/dev/ath/ah_osdep.h:127:49: note: expanded from macro 'OS_REG_WRITE' > (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val)) > > iirc, back then, it was labeled as a clang bug. however testing with clang tot, > i still get those warnings. so i just wanted to ask again, whether the warnings > are really bogus, or if these warnings actually indicate issues during > shifting? Those warnings are bogus, and due to this bug: http://llvm.org/bugs/show_bug.cgi?id=10030 Unfortunately, it is still not fixed for the 3.0 release branch, and I don't expect it will be fixed for the actual release.