Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-18 Thread Phil Hord
On Thu, Jan 17, 2013 at 11:44 AM, Linus Torvalds torva...@linux-foundation.org wrote: On Thu, Jan 17, 2013 at 3:00 AM, John Keeping j...@keeping.me.uk wrote: There's also a warning that triggers with clang 3.2 but not clang trunk, which I think is a legitimate warning - perhaps someone who

Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-18 Thread Linus Torvalds
On Fri, Jan 18, 2013 at 9:15 AM, Phil Hord phil.h...@gmail.com wrote: Yes, I can tell by the wording of the error message that you are right and clang has a problem. But the git code it complained about does have a real problem, because the result of signed int a = ULONG_MAX is

Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-17 Thread Linus Torvalds
On Thu, Jan 17, 2013 at 3:00 AM, John Keeping j...@keeping.me.uk wrote: There's also a warning that triggers with clang 3.2 but not clang trunk, which I think is a legitimate warning - perhaps someone who understands integer type promotion better than me can explain why the code is OK

Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-17 Thread Antoine Pelisse
BTW, I think it has been addressed [1] by clang already and that would explain why you don't have the warning when using clang trunk version. [1]: http://llvm-reviews.chandlerc.com/D113 Antoine, On Thu, Jan 17, 2013 at 5:44 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Thu, Jan

Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-17 Thread John Keeping
On Thu, Jan 17, 2013 at 08:44:20AM -0800, Linus Torvalds wrote: On Thu, Jan 17, 2013 at 3:00 AM, John Keeping j...@keeping.me.uk wrote: There's also a warning that triggers with clang 3.2 but not clang trunk, which I think is a legitimate warning - perhaps someone who understands integer

Re: [PATCH 2/2] fix clang -Wtautological-compare with unsigned enum

2013-01-16 Thread Antoine Pelisse
With these two patches and the patch from Max Horne, I'm deeply sorry for this typo Max -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html