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

Re: termios constants should be unsigned

From: Alejandro Colomar <alx@kernel.org>
Date: 2024-06-12 18:55:28
Also in: linux-api

Hi Elliott, Paul,

On Wed, Jun 12, 2024 at 01:47:03PM GMT, enh wrote:
well, any change like this is a potential source incompatibility ... i
hacked these changes into AOSP, and it did break one bit of existing
code that was already working around the sign differences --- this
warning was enabled but the code had a cast to make the _other_ side
of the comparison signed (rather than make this side of the comparison
unsigned).

Android's libc [bionic] uses the uapi headers directly, so we would be
affected, but to be clear --- i'm fine with this if the consensus is
to go this way.
Hmmm; I see.  I guess for this already-existent case we can just live
with it.  Then I'll just ask to consider using unsigned constants for
new stuff that is a bit pattern and not just a number.

Let's drop the patch.

Have a lovely day!
Alex
(but, yeah, i'm with the "how about we fix the language and compiler
rather than all the extant code?" sentiment from Paul Eggert.)
Hmmm, can agree to that.  At least if we don't continue writing bad code
for the new one.  :)

-- 
<https://www.alejandro-colomar.es/>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help