Page 1 of 1

Who wants to devolop a C compiler together ?

Posted: Sun Dec 21, 2008 7:27 am
by david
Who wants to develop a C compiler together ?

Re: Who wants to devolop a C compiler together ?

Posted: Sun Dec 21, 2008 8:10 am
by quirck
What new features will appear in your compiler?
Why will it be better than already existing ones?
Or this is just for fun - to practise in the theory of translators?

Re: Who wants to devolop a C compiler together ?

Posted: Sun Dec 21, 2008 10:22 am
by Troy Martin
I once wrote a compiler for a small subset of BASIC. It translated to a macro-filled NASM syntax .asm file which NASM would then compile.

All written in C.

Re: Who wants to devolop a C compiler together ?

Posted: Sun Dec 21, 2008 12:54 pm
by bewing
Ooooh, I'm tempted. But I'm a bit bogged down in the middle of writing my own assembler, ATM. Pkus other stuff.
Plus, my focus would be on trying to make it tiny and fast, and it's unlikely that's where you want to go with it.

Re: Who wants to devolop a C compiler together ?

Posted: Sat Dec 27, 2008 9:59 pm
by JohnnyTheDon
If you're really serious about this take a look at llvm ( http://www.llvm.org/ ). By compiling to llvm bitcode instead of regular assembly, you can link on multiple architectures easily. It also simplifies optimizations because llvm will do that for you. They currently have a modified version of gcc for llvm, but I don't think there are any compilers written from the ground up using it.

Re: Who wants to devolop a C compiler together ?

Posted: Mon Dec 29, 2008 4:43 pm
by engine252
I would like to develop a c# compiler that generates code for the nasm assembler.
I intend to develop a kernel with that compiler.
If you'd consider developing a c# compiler we can handle this together.
I know how compilers work, never made one, but i'm a fast learner.;)

Re: Who wants to devolop a C compiler together ?

Posted: Mon Jan 05, 2009 8:33 am
by Walling
JohnnyTheDon wrote:They currently have a modified version of gcc for llvm, but I don't think there are any compilers written from the ground up using it.
They also started the clang project writing a C compiler from the ground. Supposedly it is faster than GCC and with better error messages. I'm thinking about using it instead of GCC for osdev.

Re: Who wants to devolop a C compiler together ?

Posted: Fri Jan 23, 2009 12:41 am
by iammisc
Having just come out of the great experience of developing my own compiler for my own language. I have one piece of advice: DON'T. Unless you have some killer new feature that the world can absolutely not live without DON'T.

It's not as easy as it looks.

It takes a LONG time to get right.

Things WILL break.

Unless you're doing this purely for fun and research DON'T and even then make sure you REALLY want to do this. Like REALLY REALLY REALLY want to.

Re: Who wants to devolop a C compiler together ?

Posted: Sun Jan 25, 2009 3:05 pm
by nekros
Yeah^ what that guy said. :lol: I've done a pretty serious study of compilers on my own. They are complicated. VERY complicated. And it gets even harder when you have more complex languages like c. If you want to develop a piece of software like this, you had better have a damn good plan. You can't really just say lets build a compiler and expect everything to work out. It's even harder when you have more than one person (things will be even more buggy). Make a detailed design (and I don't just mean a list of things it will do), and after that, before you start coding away you should REALLY sleep on it for awhile. Make sure you really want to do this as said before.