Article View: gnu.misc.discuss
Article #2248Porting GCC to OUTPUT C-code ???
From: G. Albert Mietus
Date: Thu, 16 Jan 1997 00:00
Date: Thu, 16 Jan 1997 00:00
32 lines
1773 bytes
1773 bytes
Hai all, I have a question, which maybe looks sily, but I will explain Would it be possible to add a new backend to GCC which will be plain ANSI-C? I'm quite sure it is "possible", but I realy want to know how much work it will be, how "good" the code will be, and Maybe it is already been done? Ok, mine motivation: I have a few, First when a good gcc-to-C compiler exist we can use GCC as crosscompiler for "strange" target for other languages as C (E.g. for many dedicated systems good C compilers exist, but no C++ or Objective-C compilers. Such a gcc-to-C compiler can be used as to produce code, like other tools (yacc, lex, etc) wich is oftern more acceptable than "stange" compilers. Often I can use any tool to produce some C code I like, but I have to use Version X of compiler Y to produce an image. Second, it can be nice to study the optimizer. Nowdays, I sometimes run GCC on a "short" piece of C (or ObjC, ..) code with -S as option to produce assembly, and study that asm. but that is hard! When the output is C code, it is easier to see what is hapening (I hope:-) BTW, It isn't that strange, Most early C++ compilers did it that way! The compiled to C! Thanks __GAM
Technical Details
Message-ID:
<87sp41z4p3.fsf@beowulf.gamp.hacom.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f65d0,d177f03ce12a0b49,start X-Google-Attributes: gidf65d0,public X-Google-Thread: 1025b4,d177f03ce12a0b49,start X-Google-Attributes: gid1025b4,public From: G. Albert Mietus <albert@gamp.hacom.nl> Subject: Porting GCC to OUTPUT C-code ??? Date: 1997/01/16 Message-ID: <87sp41z4p3.fsf@beowulf.gamp.hacom.nl> X-Deja-AN: 210273827 sender: albert@beowulf.gamp.hacom.nl organization: We aren't! Should we, then it's SW, Education and Advice. newsgroups: gnu.misc.discuss,gnu.gcc