Hi Ben, > gnulib has three definitions of ASCII_ONLY in files that #include > "vasnprintf.c": > > lib/unistdio/u16-vasnprintf.c:#define ASCII_ONLY 1 > lib/unistdio/u32-vasnprintf.c:#define ASCII_ONLY 1 > lib/unistdio/u8-vasnprintf.c:#define ASCII_ONLY 1 > > But I don't see any actual uses of this macro. What is the > intent? (Is it related to FCHAR_T_ONLY_ASCII?)
Bingo! The comments in vasnprintf.c say: FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters in the format string are ASCII. MUST be set if FCHAR_T and DCHAR_T are not the same type. And in lib/unistdio/u{8,16,32}-vasnprintf.c FCHAR_T and DCHAR_T are indeed not the same type. Therefore the 3 files should define FCHAR_T_ONLY_ASCII, not ASCII_ONLY. I would be grateful to you if you could commit the obvious fix. Did you find this by code inspection, or through a gcc or clang warning? Bruno