• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 30672136635 / 1
85%
master: 84%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 31 Jul 2026 11:32PM UTC
Files 600
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2026 11:10PM UTC coverage: 85.23% (-0.02%) from 85.249%
30672136635.1

push

github

web-flow
fix(posit): clear -Wsign-conversion in posit_impl convert_ (#1281) (#1286)

Sub-issue of Epic #1279. Four sites in the posit encode/rounding path
(convert_), all value-preserving:

- `exponent = e % (1ull << es)`: the signed scale `e` was already promoted
  to unsigned long long by the modulo (the other operand is 1ull); make it
  explicit. This is correct for a power-of-two modulus -- 2^64 mod 2^es is
  0, so the unsigned reinterpretation of a two's-complement negative e
  yields exactly the low es bits, which is the posit exponent field (and
  matches the arithmetic-shift regime split e >> es).
- `regime <<= es + nrFbits + 1u`, `exponent <<= nrFbits + 1u`,
  `pt_bits <<= pt_len - len`: unsigned shift-amount / left-align distance
  flowing into operator<<=(int); each is >= 1 and small by construction.
  Cast to int explicitly.

Proven behavior-neutral: optimized assembly (g++ -O2) for a TU
instantiating convert_ across posit<8,0>/<16,1>/<32,2>/<64,3> is
byte-for-byte identical before and after -- the casts are explicit forms
of conversions the compiler already performed implicitly.

The dead `convert_to_bb` (inside `#ifdef TBD`, never called) has the same
idiom but does not compile, so it is intentionally left untouched.

Verified posit_impl -Wsign-conversion AND -Wconversion clean on gcc AND
clang; posit conversion/assignment/multiplication regressions PASS on
both. (The posit<64,2..4> division failures are pre-existing on main --
identical counts with the fix reverted -- and out of scope here.)

Relates to #1279
Resolves #1281

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

41708 of 48936 relevant lines covered (85.23%)

7271799.74 hits per line

Source Files on job 30672136635.1
  • Tree
  • List 600
  • Changed 5
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30672136635
  • 31569157 on github
  • Prev Job for on main (#30660486273.1)
  • Next Job for on main (#30672084664.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc