Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc/locale



Module Name:    src
Committed By:   riastradh
Date:           Tue Oct  8 13:42:17 UTC 2024

Modified Files:
        src/lib/libc/locale: c16rtomb.c c8rtomb.c

Log Message:
c16rtomb, c8rtomb: Omit needless casts.  Mark remaining lint issues.

These casts were introduced to pacify lint.  lint has now been fixed
to handle __SHIFTOUT/__BITS more robustly so some of them are no
longer needed to pacify lint.

But lint still objects without some semantically unnecessary casts --
mark those.

- In c8rtomb, c32 is guaranteed to be at most 24-bit -- actually, at
  most 21-bit -- but I'm not sure how to prove this to lint without a
  transitive analysis of the state machine transitions and knowledge
  of the only allowed initial state.

- In c16rtomb, the shiftouts are always 9-bit and so the shiftin
  should never overflow, but lint hasn't figured this out yet.

PR standards/58601: uchar.h C23 compliance: char8_t, mbrtoc8, c8rtomb
PR toolchain/58728: __SHIFTIN/__BITS of values in known-limited range
  without cast


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/locale/c16rtomb.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/c8rtomb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index