You are browsing as a guest. Sign up (or log in) to start making projects!

DotNetC

  • 1 Devlogs
  • 12 Total hours

DotNetC is a C compiler made in C

Open comments for this post

12h 16m 48s logged

So I reused a lot of the previous work done for my C++ compiler in C#, but instead of targeting IL it’s targeting straight ASM, soooo yeah. Anyhow lemme get into it:

The preprocessor system is fully implemented so you have #define, #undef, #ifdef, #ifndef, #if, etc.

The compiler supports C89 fully minus the STD, but I have char, short, int, long etc. all the floating point types const, typedef, volatile, etc.

Now for declarations you can have K&R functions, extern declarations, static locals, static arrays, multiple declarators, etc.

All arithmetic, bitwise, comparisons, logical, ternary, pre/post, casts, and assignments as expression operators are supported.

if/else, while, do/while, for, switch/case/default, break, continue, return, goto, labels, and compound statements are all supported.

Now the biggest part Code-gen it targets x86-64 Windows with full Microsoft ABI supported, variadic functions, struct return, 64-bit arithmetic, widening , string pool dedupplicatoin, floating point support, and a few more things.

Now Standard Library-wise stdio.h, stdlib, string.h, assert.h, cytpe.h, and time.h are the only supported ones as of right now while I continue to implement them.

1
0
38

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…