On HP-UX 11.31/hppa, I'm seeing this compilation error: cc: "../../gltests/test-uchar.c", line 33: error 1511: Bit-field size must be a constant. cc: "../../gltests/test-uchar.c", line 33: error 1613: Zero-sized struct. cc: "../../gltests/test-uchar.c", line 33: warning 504: The sizeof operator applied to a zero-sized object.
The char32_t is correctly defined. It looks like the compiler has a problem with casted values in constants. 2020-01-03 Bruno Haible <br...@clisp.org> uchar tests: Avoid compilation error with HP cc. * tests/test-uchar.c: Disable a test when HP cc is in use. diff --git a/tests/test-uchar.c b/tests/test-uchar.c index c2de59d..020d82d 100644 --- a/tests/test-uchar.c +++ b/tests/test-uchar.c @@ -30,7 +30,9 @@ char32_t d = 'y'; /* Check that char16_t and char32_t are unsigned types. */ verify ((char16_t)(-1) >= 0); +#if !defined __HP_cc verify ((char32_t)(-1) >= 0); +#endif /* Check that char32_t is at least 31 bits wide. */ verify ((char32_t)0x7FFFFFFF != (char32_t)0x3FFFFFFF);