rui314 / 8cc

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

Failure on Mac #45

Closed fmardini closed 9 years ago

fmardini commented 9 years ago

Hello,

I am on OSX 10.9.5 and make test is failing with

[WARN] cpp.c:628: /usr/include/sys/cdefs.h:81:0: #warning: "Unsupported compiler detected" [ERROR] parse.c:1904: /usr/include/string.h:81:44: identifier, ( or * are expected, but got )

when I look there I see

if !defined(GNUC) || GNUC < 4

But when running with ./8cc -DGNUC -a -o h hello.c

I get zsh: segmentation fault ./8cc -DGNUC -a -o h hello.c

Should I be including a different set of header files?

Thanks

rui314 commented 9 years ago

Mac OS header files are peculiar. There are a lot of things to do if you want to run it on Mac OS.