rui314 / 8cc

A Small C Compiler
MIT License
6.13k stars 740 forks source link

compiling sqlite3 #19

Closed andrewchambers closed 9 years ago

andrewchambers commented 9 years ago

I think a cool real world thing to compile successfully may be the sqlite3 amalgamation and shell. 'The amalgamation is a single C code file, named "sqlite3.c" ' ... 'This file contains about 149K lines of code (90K if you omit blank lines and comments) and is over 5.2 megabytes in size.'

http://www.sqlite.org/amalgamation.html

Using it as a test suite / benchmark would be fairly trivial once it compiles as it is only a few source files. (isolating runtime compile issues would be a challenge however.)

I think it would be a really powerful example to compile. I'm not sure how far 8cc is away from building it.

andrewchambers commented 9 years ago

20 was found while trying to build sqlite3.c. There is a parse issue I haven't been able to reduce yet - Possibly another easy bug, but am unsure.

andrewchambers commented 9 years ago

I'll track this myself, perhaps on my own fork.