Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anyone tried using it? How do I use it to generate executable (as per the code it should fork the 'as')?

Getting following error: [ERROR] main.c:144: (null): One of -a, -c, -E or -S must be specified

-c, -E and -S are working fine. Couldn't figure out from code what -a does.



Have you tried -o to specify the output file?

As for -a it doesn't look like -a is actually handled in parseopt, through process of elimination it looks like -E sets cpponly, -c sets dontlink, and -S sets dumpasm. So from main.c:143 if you don't set any of those, dumpast needs to be true, and the only way I see that getting set to true is by using this flag '-fdump-ast'

From this commit[0] it looks like -a was removed, but usage docs and error messages weren't updated.

[0]https://github.com/rui314/8cc/commit/614f6e7b643333b9baaf8fb...

Edit: adding link to relevant commit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: