Re:GCC Rust Approved by GCC Steering Committee
by steveklabnik on Monday July 11, 2022 @01:16PM
(#32058878)
> so, for implementing the GCC frontend, read the current LLVM frontend really carefully and do everything the same way?
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.
Re:GCC Rust Approved by GCC Steering Committee
by b3morales on Monday July 11, 2022 @12:00PM
(#32057894)
Integration-style tests are a good tool here. Given a set of programs in the target language with certain expected behavior on the reference compiler, you check that compiling and running with the second compiler produces the same behavior.
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?