logoalt Hacker News

kzrdudetoday at 10:29 AM1 replyview on HN

My go-to example of "UB is everywhere" is this one:

    int increment(int x) {
        return x + 1;
    }
Which is UB for certain values of x.

Replies

CodeArtisantoday at 11:03 AM

C23 removed the whole stuff about indeterminate value and trap representation. Underflow/overflow being silent or not is implementation defined.

show 1 reply