Self Compiled C

A beautiful piece of code implementing a subset of the C language and which self compiles. The repository is available here:

rswier/c4
C in four functions. Contribute to rswier/c4 development by creating an account on GitHub.

To test this out, first add the following code to a file titled hello.c

#include <stdio.h>

int main()
{
  printf("hello, world\n");
  return 0;
}

Next, add the following code linked here to a file titled c4.c

Finally, run the following commands.

gcc -o c4 c4.c
./c4 hello.c
./c4 -s hello.c
./c4 -s c4.c
./c4 c4.c hello.c
./c4 c4.c c4.c hello.c

Amazing!


Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to Linux Developer
Great! Next, complete checkout for full access to Linux Developer
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.