Hacker News new | ask | show | jobs
by pjc50 760 days ago
> That's not UB

Please cite chapter and verse of the C standard which defines this behavior. Any edition.

1 comments

I don't know if this particular example is UB or not, but the dichotomy here between 'defined' and 'not defined' is a false one, as C also specifies some constructs as having 'implementation defined' behavior. The behavior of such constructs is not defined in the standard, but is also not 'undefined' in the special sense of 'undefined behavior'.

Edit: Looks like the result in this case is implementation defined: https://stackoverflow.com/a/24212940