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

Unfortunately, I cannot compile it on my OSX 10.10... here's what I get: http://pastebin.com/cVvaYFEH

EDIT: just make next() function void and it works.

EDIT2: still no fortune :(

  $ ./c4 hello.c
  [1]    33920 segmentation fault  ./c4 hello.c


For now, you need to add both -Wno-return-type and -m32 when compiling.


I think it doesn't work on x86-64, since the code assumes

    sizeof(int) == sizeof(void*)


Yep, you can compile it on 64 bit OS X with clang's -m32 option and it should work:

    ➜  c4 git:(master) ✗ clang -m32 c4.c
    ...
    ➜  c4 git:(master) ✗ ./a.out hello.c 
    hello, world
    exit(0) cycle = 9


Please try kbrock's fork at https://github.com/kbrock/c4 Check out his 'longs' branch.




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

Search: