News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by maxlybbert on Thursday May 20, 2021 @09:58PM (#27229704)
> the standard allows us to treat "for (int i=param; i < param + 16; i++)" as if it were guaranteed to loop 16 times in all cases.

The standard allows this, but the standard also allows iterating less than 16 times, or turning it into an infinite loop, or doing things that a programmer can’t actually do intentionally inside the language’s rules. Undefined means “nothing is defined.” It doesn’t mean “nothing is defined, but in an intuitive way.”

There are no comments on this comment yet.