findutils 4.9.0: localeconv test failed on RISCV
Yuqi Guo <[email protected]>
| Newsgroups | gmane.comp.gnu.findutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
File: gnulib-tests/test-localeconv.c Code: ``` struct lconv *l = localeconv (); ASSERT (l->frac_digits == CHAR_MAX); ASSERT (l->p_cs_precedes == CHAR_MAX); ASSERT (l->p_sign_posn == CHAR_MAX); ASSERT (l->p_sep_by_space == CHAR_MAX); ASSERT (l->n_cs_precedes == CHAR_MAX); ASSERT (l->n_sign_posn == CHAR_MAX); ASSERT (l->n_sep_by_space == CHAR_MAX); ``` Problem: On RISCV, the `char` is unsigned. Thus, the `CHAR_MAX` is 255 instead of 127 on x86. However, the localeconv values remain the same on RISCV as x86 (the values are 127). This makes the assertions fail on RISCV. I'm not sure if this is a bug. Should localeconv values always equal to `CHAR_MAX` no matter whether the char is signed or unsigned?