On 6/6/24 11:01, Yuqi Guo wrote:
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?

Thanks for the report.
There's been some char-related changes in the related gnulib files between
findutils 4.9.0 (2022) and the new 4.10.0.
Would you please test if that problem still exists there?

Thanks & have a nice day,
Berny

Reply via email to