[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with c
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang |
Date: |
Wed, 23 Mar 2022 12:58:03 -0400 (EDT) |
Follow-up Comment #6, bug #62212 (project octave):
Looks like it *is* undefined behavior:
https://en.cppreference.com/w/cpp/language/implicit_conversion
> Floating–integral conversions
> A prvalue of floating-point type can be converted to a prvalue of any
integer type. The fractional part is truncated, that is, the fractional part
is discarded. If the value cannot fit into the destination type, the behavior
is undefined (even when the destination type is unsigned, modulo arithmetic
does not apply).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62212>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Arun Giridhar, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Arun Giridhar, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang,
Markus Mützel <=
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Arun Giridhar, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, John W. Eaton, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, John W. Eaton, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Markus Mützel, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Wrong unsigned integer overflow with clang, Arun Giridhar, 2022/03/23
- [Octave-bug-tracker] [bug #62212] Issues when casting large integers to floating point, Markus Mützel, 2022/03/28
- [Octave-bug-tracker] [bug #62212] Issues when casting large integers to floating point, Arun Giridhar, 2022/03/28