https://users.rust-lang.org/t/where-is-the-rust-language-spe...
"For the most part though, rustc itself is the spec" - so, for implementing the GCC frontend, read the current LLVM frontend really carefully and do everything the same way? And try to keep up with all the changes which will inevitably happen in the LLVM frontend while you are implementing the GCC frontend?
At a high level, this is correct: https://github.com/Rust-GCC/gccrs/wiki/Frequently-Asked-Ques...
> If gccrs interprets a program differently from rustc, this is considered a bug.
I don't believe they are only reading the frontend, but using the reference first, then looking to the implementation second, and asking a lot of questions along the way.
(btw, there's also https://doc.rust-lang.org/reference/)
With an ideal standard document that describes the language, someone could build a compiler for the language from scratch and it should behave correctly. See https://en.wikipedia.org/wiki/Programming_language_specifica...
Some example standards:
C: https://www.open-std.org/jtc1/sc22/wg14/
ECMAScript (Javascript): https://tc39.es/ecma262/
C++: https://isocpp.org/std/the-standard
Scheme: https://schemers.org/Documents/Standards/
Ada: http://www.ada-auth.org/standards/ada12_w_tc1.html
For Rust, Ferrous Systems is working on the Ferrocene Language Specification to formally document the Rust subset that Ferrocene will use.
https://ferrous-systems.com/blog/ferrocene-language-specific...
ISO will stamp any fantasy like OOXML, but that doesn't mean the standard is useful.