Date: Thu, 03 Nov 2011 16:11:04 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Alexander Best <arundel@freebsd.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings Message-ID: <4EB2AF08.9010806@FreeBSD.org> In-Reply-To: <20111103104523.GA30132@freebsd.org> References: <20111103104523.GA30132@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EB2AF08.9010806>