Paul Eggert wrote: > How about this instead? It seems like a more-complete check. > > int check_WINT: (((wint_t) -1 < 0 > ? WINT_MIN + WINT_MAX - 1 < 0 > : WINT_MIN == 0 && WINT_MAX == (wint_t) -1) > ? 1 : -1);
The checks in the autoconf macros don't need to be complete. They only need to catch all known bugs on existing platforms. Our detector against future surprises is the unit test, which not only "more complete" but really complete: verify (TYPE_MINIMUM (wint_t) == WINT_MIN); verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); verify_same_types (WINT_MIN, (wint_t) 0 + 0); verify_same_types (WINT_MAX, (wint_t) 0 + 0); In other words, I find a 1-line expression nicer than a 4-line expression, and if it leads to the same autoconf macro results on all existing platform, why not keep it? Bruno