Article View: gnu.gcc.help
Article #50756Re: why gcc? - Because it is a truly fantastic tool.
From: D. Erway
Date: Fri, 20 Aug 1993 01:41
Date: Fri, 20 Aug 1993 01:41
79 lines
4545 bytes
4545 bytes
In article <1993Aug19.185453.15791@das.harvard.edu>, H. Jiu <jiu@kepler.harvard.edu> wrote: >Hi! Can someone please tell me why you use GNU C compiler instead of, >say, the standard distribution that comes with your computer? Is it >a religious sentiment like somepeople have with a particular brand of, >say, condoms? I have used GNU C compiler several times, but in general >I find it inferior to standard C compilers on Sun SPARCs, DEC RISCs, >IBM RS/6000s, etc. I can't imagine what you could mean by inferior. We have been using GCC under SunOS 4.1.x for both native and cross compilation. Most of my recent experience is with cross development, sun4 => embedded 68030. We have been using the Oasys/Greenhills tool set for about 6 years, keeping it up to date. Our latest version is Greenhills 1.8.5Rc. Greenhills is supposed to be about the hottest compiler tech around (at least according to them!). We recently decided to port our code to GCC anyway, because of it's superior multi-platform support. Little did we know what a huge win it would be. First of all support. We never got any support out of Oasys, though we certainly paid for it. We would report a bug, and never get so much as a thankyou. With the FSF, we report bugs, and we get feedback almost immediately - sometimes a "Please try this patch", sometimes a thankyou, sometimes a "This is fixed in the next release which is due out this weekend", sometimes a "We can't reproduce it. Please send more info." Always something. This of course makes us keen to report any bugs we find, because we know we are helping to improve the next release. Building native and cross compilers is a breeze. Just follow directions. And of course Cygnus is always available to do it for you, and support you as well. Porting our code was a snap. We ported about 200k lines of code (including boot, device driver, and real-time os code) in about 2 man weeks. In all our porting, we only encountered 1 compiler bug, which we reported, and easily worked around. I forget how many Greenhills compiler bugs we have had to work around. The real win here is the compiler warnings. We used: -Wall -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings Once we get everything to compile with no warnings, it almost always works first try. We merged 2 branches of 100k lines of code each that had been diverging in really major ways (like significant re-structuring), for about a year, and when we compiled and edited until there were no warnings, it all ran first try, (actually second try, after fixing a typo). It wasn't all entirely correct yet, but it ran, which amazed us all. Of course a great deal of credit here goes to GNU Emacs and it fantastic merge facilities. GCC produces code that is about 10% smaller than the Greenhills compiler. (This is using -O on both compilers.) GCC compiles 2.4 times faster than Greenhills. (Also with -O). I can't even compare GCC to SunOS 4.1.x cc, since it isn't even ANSI. If you are writing new C code, and not using protoypes, you are stumbling in the dark compared to what is possible. I don't know what else good I can say. If I left anything out, it is due to there being so much good exciting stuff that I can't remember it all! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! WIN! Thankyou FSF! -Don \-----------------------------------------------------------------------/ | Don Erway derway@ndc.com | | NDC Systems | | Monrovia, CA Opinions expressed herein apparently | | (Somewhere Near Pasadena) spontaneously organized themselves. | /-----------------------------------------------------------------------\
Technical Details
Message-ID:
<251a4oINNsbk@gap.caltech.edu>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!news.claremont.edu!nntp-server.caltech.edu!derwayReferences:
<1993Aug19.185453.15791@das.harvard.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,7c547ffe6f666c32 X-Google-Attributes: gid11318c,public X-Google-Thread: 1025b4,14a50190c06448d9,start X-Google-Attributes: gid1025b4,public X-Google-ArrivalTime: 1993-08-19 18:58:46 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!news.claremont.edu!nntp-server.caltech.edu!derway From: derway@cco.caltech.edu (D. Erway) Newsgroups: gnu.gcc.help,gnu.misc.discuss Subject: Re: why gcc? - Because it is a truly fantastic tool. Date: 20 Aug 1993 01:41:44 GMT Organization: California Institute of Technology, Pasadena Lines: 79 Message-ID: <251a4oINNsbk@gap.caltech.edu> References: <1993Aug19.185453.15791@das.harvard.edu> NNTP-Posting-Host: alumni.caltech.edu