Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Int a = 5; a = a++ + ++a; a =? (2011). Parent comment
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.
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.