r/cprogramming • u/am_Snowie • Oct 16 '26
is doing ~INT_MAX undefined behavior?
/r/C_Programming/comments/1x7hxgd/is_doing_int_max_undefined_behavior/
5
Upvotes
r/cprogramming • u/am_Snowie • Oct 16 '26
View all comments
Show parent comment
1
u/flatfinger Oct 16 '26
Note that the term "undefined behavior" was originally used as a catch-all for situations where the authors of the Standard wanted to waive jurisdiction for any reason, and in some cases that reason was that not that nobody knew how a construct should be expected to behave, but rather that everyone knew how it should be expected to behave on any remotely commonplace systems, and people who actually worked with arcane systems would be better placed than the Committee to judge whether such systems would have an obvious expected behavior.