4 comments

  • jey32 minutes ago
    It targets x86-64/ELF? I thought it would target `sh` to be portable?
  • kelsey987654311 hour ago
    Would be a lot better if it came with tests. Please do this justice and dont let it rot as a gist, make a real repo and add some docs and at least smoke tests or some kind. Thanks
  • gaigalas1 day ago
    Single standalone file, no external tools used, PATH=&#x27;&#x27; (empty), portable (bash, dash, ksh, zsh), produces x86 ELF executables, has mini-libc builtin.<p>Usage:<p>printf &#x27;int main(){puts(&quot;hello&quot;);return 0;}&#x27; | sh c89cc.sh &gt; hello<p>chmod +x hello<p>.&#x2F;hello
    • angry_octet50 minutes ago
      I can&#x27;t think of a reason to use c89cc.sh, but I salute this effort nonetheless.
  • dmitrygr1 hour ago
    Many parts of this are clearly autogenerated, but that in no way diminishes the sickening impressiveness of it!
    • userbinator27 minutes ago
      It would be far more interesting to look at what this was &quot;compiled&quot; from; it looks like the output of a state-machine generator.
    • phire30 minutes ago
      It does make it a little hard to understand how the parser&#x2F;ast_builder works.<p>But the rest seems easy enough to understand.