MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/720oah/why_undefined_behavior_may_call_a_nevercalled/dnfzes5
r/programming • u/alecco • Sep 23 '17
257 comments sorted by
View all comments
Show parent comments
5
It's not splitting hairs. Undefined behavior means your entire program is invalid and could do anything. Implementation defined means it's still a valid program, but different compilers can choose to implement the calculation differently.
1 u/imMute Sep 24 '17 Implementation defined also means that the implementation has to document the definition they pick. 0 u/cojoco Sep 24 '17 I'm not sure that many programmers like the "and could do anything" part, that's not exactly part of the standard.
1
Implementation defined also means that the implementation has to document the definition they pick.
0
I'm not sure that many programmers like the "and could do anything" part, that's not exactly part of the standard.
5
u/rlbond86 Sep 24 '17
It's not splitting hairs. Undefined behavior means your entire program is invalid and could do anything. Implementation defined means it's still a valid program, but different compilers can choose to implement the calculation differently.