News for hackers. Stuff that matters.
Re:There is no 'printf' by _kst_ on Friday October 22, 2021 @11:36PM (#28965463)
No, it's not undefined behavior. Only the status returned to the host environment is undefined. (And in C99 and later, the status is 0.)

As for your example:

int foo(int x) { if (x >= 0) return 123; if (x < 0) return 456; }

that has undefined behavior only if the caller uses the value. (That's to cater to ancient C code written before the void type was introduced.)

There are no comments on this comment yet.