Re:Checked integer arithmetic in the prospect of C23
by tinus_hn on Monday December 19, 2022 @06:54PM
(#34059586)
C is supposed to be reasonably portable so it doesn’t make too much sense to depend on flags that are not available on all platforms.
[ Parent
| on HN ]
Re:Checked integer arithmetic in the prospect of C23
by int_19h on Monday December 19, 2022 @07:17PM
(#34059789)
It's easier to find a platform that doesn't support floating-point numbers than one that doesn't have some kind of overflow flag. Some kind of platform-independent abstraction is long (as in, decades) overdue.
Re:Checked integer arithmetic in the prospect of C23
by noobermin on Monday December 19, 2022 @07:19PM
(#34059811)
Sure, but it kind of is insane that there are platforms (like ARM apparently, did not know) that do NOT have a carry flag.