state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings

2011-11-03 Thread Alexander Best
hi there, i think the following warnings were discussed once before: In file included from /usr/git-freebsd-head/sys/dev/ath/ath_hal/ah_regdomain.c:99: /usr/git-freebsd-head/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative]

Re: [toolchain] disable -Wtautological-compare for clang

2011-11-03 Thread Alexander Best
On Mon Oct 17 11, Gerald Pfeifer wrote: > On Tue, 18 Oct 2011, Matthias Andree wrote: > >> any chance we could disable -Wtautological-compare for clang? i don't > >> think comparing an unsigned int against < 0 is worth a warning. > >> actually it's always nice to have such a seatbelt, in case som

Re: [toolchain] disable -Wtautological-compare for clang

2011-11-03 Thread Alexander Best
On Mon Oct 17 11, Warner Losh wrote: > I'm all for leaving it on because things like char are signed on some > architectures and unsigned on others. This leads to bugs that only appear on > one architecture. This warning will, at least, flag those usages. -funsigned-char / -fsigned-char could

Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings

2011-11-03 Thread Dimitry Andric
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 (0x2) requires 35 bits to represent, but > 'int' only has 32 bits [-Wshift-overflow] > OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_

Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings

2011-11-03 Thread Alexander Best
On Thu Nov 3 11, Dimitry Andric wrote: > 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 (0x2) requires 35 bits to represent, > > but 'int' only has 32 bits [-Wshift-overflow] > >

Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings

2011-11-03 Thread Dimitry Andric
On 2011-11-03 20:03, Alexander Best wrote: > On Thu Nov 3 11, Dimitry Andric wrote: >> 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 (0x2) requires 35 bits to represent, >>> but

Re: state of clang(1)'s -Wshift-count-negative and -Wshift-overflow warnings

2011-11-03 Thread Adrian Chadd
Hi, Please submit a PR and I'll fix the AR5210 code. I'll have to find an AR5210 though to test it against though... Adrian On 3 November 2011 13:08, Dimitry Andric wrote: > On 2011-11-03 20:03, Alexander Best wrote: >> On Thu Nov  3 11, Dimitry Andric wrote: >>> On 2011-11-03 11:45, Alexander