Thread (18 messages) 18 messages, 5 authors, 2024-06-13

Re: termios constants should be unsigned

From: Paul Eggert <hidden>
Date: 2024-06-12 14:55:16
Also in: linux-man

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help