News for hackers. Stuff that matters.
Re:Int a = 5; a = a++ + ++a; a =? (2011) by 1718627440 on Friday May 15, 2026 @08:39AM (#48147871)
> The compiler is supposed to compile programs that comply with the spec

Yes.

> and not compile programs that don't.

No, there is no limitation on what a compiler does in this case.

> The concept of "compiling a program that doesn't comply with the spec" doesn't even exist!

It does, it is called "undefined behaviour".

> A text file that doesn't comply with the C spec isn't a C program.

That's the point. A program that contains UB is not a valid C program. That's what UB means.

There are no comments on this comment yet.