Comment by fooker

1 month ago

> the specification of the language

Guess what language the specification is written in (if it exists at all) ?

It's usually natural language, and even then, compilers deviate from the specification all the time, and the specification has bugs.

Formal specifications are a thing, but the science is nowhere mature enough to dictate what compilers do.

> unless it has a bug

Compilers are not magic, the way it follows specifications is up to the interpretation of compiler developers like yours truly. And there are tens of thousands of compiler bugs. There was a notorious LLVM pass that had more bugs than lines of code ;)

https://github.com/llvm/llvm-project/issues?q=is%3Aissue

This is a list for just the last few years after LLVM switched to the using github for tracking issues.