Re: PR 43772 Errant -Wlogical-op warning when testing limits

2012-05-10 Thread Dodji Seketeli
Sorry for my late reply. Manuel López-Ibáñez writes: > This patch fixes almost all false positives in PR43772. The case not fixed is: > > intmax_t i = (whatever); > if (INT_MAX < i && i <= LONG_MAX) > print ("i is in 'long' but not 'int' ran") > > where we warn if INT_MAX = LONG_MAX < I

Re: PR 43772 Errant -Wlogical-op warning when testing limits

2012-05-05 Thread Gabriel Dos Reis
On Sat, May 5, 2012 at 3:52 AM, Manuel López-Ibáñez wrote: > This patch fixes almost all false positives in PR43772. The case not fixed is: > >  intmax_t i = (whatever); >  if (INT_MAX < i && i <= LONG_MAX) >     print ("i is in 'long' but not 'int' ran") > > where we warn if INT_MAX = LONG_MAX <

PR 43772 Errant -Wlogical-op warning when testing limits

2012-05-05 Thread Manuel López-Ibáñez
This patch fixes almost all false positives in PR43772. The case not fixed is: intmax_t i = (whatever); if (INT_MAX < i && i <= LONG_MAX) print ("i is in 'long' but not 'int' ran") where we warn if INT_MAX = LONG_MAX < INTMAX_MAX. Perhaps with the macro location code, we could now tell