|
|
|
|
|
by clarry
2251 days ago
|
|
> Do you think such behavior is consistent with the C89 Committee's intention as expressed in the Rationale? No, but in general I'm ok with integer overflows causing disruptions (and I'm happy that compilers provide an alternative, in the form of fwrapv, for those who don't care). I do think that the integer promotions are a mistake. I would also welcome a standard, concise, built-in way to perform saturating or overflow-checked arithmetic that both detects overflows as well as allows you to ignore them and assume an implementation-defined result. As it is, preventing overflows the correct way is needlessly verbose and annoying, and leads to duplication of apis (like reallocarray). |
|