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?

Reply via email to