On Mar 2, 2012, at 2:31 PM, Joerg Sonnenberger wrote: > Consider > > #define isalpha(x) ((x) == EOF ? 0 : ctab[(unsigned char)(x)] & ALPHA_MASK) > > Modulo evaluating (x) twice, that's a generic implemenation of isalpha, > given a bit table ctab with the appropiate mask. > > Given an argument of type char, this turns effectively into a check char > == -1, which is tautological on ARM.
No, x == EOF won't trigger the warning because -1 is expanded from a macro (EOF), which follows the existing -Wtautological-compare implementation. - xi _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
