r/AskComputerScience • u/011011100101 • Mar 08 '26
educational C compiler?
I'm taking a class on systems and I'm interested in the C to assembly translation process. I'm not interested in writing a compiler, but it would be cool to study how compilers translate certain fragments of code, possibly on simpler architectures (not x86). Does anyone know of any toy/educational C compilers that can be used for this purpose?
Obviously I can look at the assembly with gcc, but I think there's a lot of sophistication in that output (information related to debugging etc). So, another question is: is there a particular way to call gcc to simplify its output and reduce that complexity?
View all comments
Show parent comment
1
u/011011100101 Mar 08 '26 edited Mar 08 '26
hm? I'm asking for a recommendation on a tool outside the scope of my class so that I can educate myself. Sounds like you're fishing for a reaction though.
The two compilers I found are lcc and the small c compiler by James Hendrix. Though, it would be nice to see something that's actually being used at the university level.