On 2024-06-12 05:16, Alejandro Colomar wrote:
tcgets.c:53:24: error: implicit conversion changes signedness: 'int' to 'tcflag_t' (aka 'unsigned int') [clang-diagnostic-sign-conversion,-warnings-as-errors]
This is a bug in Clang not glibc, and if you're worried about it I suggest sending a bug report to the Clang folks about the false positive.
Even GCC's -Wsign-conversion, which is at least smart enough to not warn about benign conversions like that, is too often so chatty that it's best avoided.
A lot of this stuff is pedanticism that dates back to the bad old days when the C standard allowed ones' complement and signed magnitude representations of signed integers. Although it can be amusing to worry about that possibility (I know I've done it) it's never been a practical worry, and even the motivation of pedanticism is going away now that C23 requires two's complement.