Menu ▾ ▴

#2877 (Regression) Incorrect overflow warning when adding two numbers

open
nobody
None
Front-end
5
2026-10-21
2019-02-28
Alan Cox
No

If you pass an 8bit constant of 233 as a uint8_t argument it works. If you pass 192 + 41 as the argument it warns you about overflows in constant conversions. 3.6.x does not have this problem. 3.7 does.

The generated code fortunately is correct.

1 Attachments

Related

Bugs: #2733
Bugs: #2827
Bugs: #3094
Discussion: warning 158: overflow in implicit constant conversion
Wiki: SDCC-STD-UX

Discussion

  • Philipp Klaus Krause

    I still see this issue as of [r13822].

     

    Related

    Commit: [r13822]

  • Christopher Bazley

    Execution on snapshot r17038 confirms the false warning, but calculates 233 correctly.

     

Log in to post a comment.