From: Antoine Pelisse Date: Wed, 16 Jan 2013 23:09:47 GMT Subject: Re: [PATCH 1/2] fix clang -Wconstant-conversion with bit fields Message-ID: In-Reply-To: <20130116230800.GB4574@serenity.lan> On Thu, Jan 17, 2013 at 12:08 AM, John Keeping wrote: > On Wed, Jan 16, 2013 at 11:47:22PM +0100, Antoine Pelisse wrote: >> clang incorrectly reports a constant conversion warning (implicit >> truncation to bit field) when using the "flag &= ~FLAG" form, because >> ~FLAG needs to be truncated. > Which version of clang did you see this with? I don't get these > warnings with clang 3.2. Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) It's good to know it's been fixed !