[comp.sys.sgi] GNU c++ bashing

eli@smectos.gang.umass.edu (Eli Brandt) (06/15/91)

I took this out of the graphics groups cuz it's not graphics.
In article <1991Jun12.201740.16463@netcom.COM> jls@netcom.COM (Jim Showalter) writes:

[ Ada/C++ discussion axed ]

>>o	C++ compilers are cheap -- the GNU family is free, and runs 
>>	on a number of different architectures.  You can get the source 
>>	code so that you can fix it if it's broken.
>
>You get what you pay for. Personally, I'd much prefer to buy a validated
>compiler with the number of bugs approaching zero than use a free compiler
>so shot full of bugs the source code is provided to me to patch around
>problems that SHOULD have been taken care of by the vendor.

Out of curiosity, have you actually used a GNU compiler?  If so, could you
specify some of the bugs with which it was "shot through".  Please, only note
those which directly affected you, because *commercial* compiler vendors don't
tell you about other bugfixes.  My experience has been that gcc is less buggy
than Sun cc or (smirk) Microsoft C.  I've had no problems working on a
prospective Obfuscated C entry.  Can you honestly tell me that you've never
wanted to look at, tweak, port, or tinker with your compiler?  Difficult
without source.  As for support, I suspect the net will be around longer than
most Ada vendors.

GCC sidenote:  It appears that gcc -O generates division code which is about six 
times faster than SGI's cc -O on a 4D.  Multiplication is "only" 70% faster.  Has
anybody else seen numbers like these?  A factor of six seems just a bit odd.
"You get what you pay for"?


[ C++ bashing, much of which I agree with, axed ]

>-- 
>*** LIMITLESS SOFTWARE, Inc: Jim Showalter, jls@netcom.com, (408) 243-0630 ****
>*Proven solutions to software problems. Consulting and training on all aspects*
>*of software development. Management/process/methodology. Architecture/design/*
>*reuse. Quality/productivity. Risk reduction. EFFECTIVE OO usage. Ada/C++.    *

/     Eli Brandt      eli@gang.umass.edu       \
\     You have been disclaimed.                /

dhinds@elaine18.Stanford.EDU (David Hinds) (06/16/91)

In article <32088@dime.cs.umass.edu> eli@smectos.CS.UMASS.EDU (Eli Brandt) writes:
>GCC sidenote:  It appears that gcc -O generates division code which is about
>six times faster than SGI's cc -O on a 4D.  Multiplication is "only" 70%
>faster.  Has anybody else seen numbers like these?  A factor of six seems
>just a bit odd.

What code, exactly, shows this big difference?  It is not believable that
two reasonable decent compilers should show a large difference in generated
code to do a single primitive operation.  Does the difference persist at
-O3 with the MIPS compiler?  It is not completely fair to compare GCC full
optimization with the first level of MIPS optimization.  I was especially
surprised to see this claim, because in my experience, GCC -O3 code is
15-25% slower than than MIPS cc -float -O3 code on my applications.  I
occasionally use GCC to help trace down bugs, because I can get more
warning messages, but I always use the MIPS compiler for compute-intensive
code.  

 -David Hinds
  dhinds@cb-iris.stanford.edu

certain@sgi.com (Andrew Certain) (06/18/91)

In article <32088@dime.cs.umass.edu> eli@smectos.CS.UMASS.EDU (Eli Brandt) writes:
>
>Out of curiosity, have you actually used a GNU compiler?  If so, could you
>specify some of the bugs with which it was "shot through".

When I was taking a computer graphics course at the University of
North Carolina - Chapel Hill, we switched from Sun's C++ to g++ and
experienced several very annoying bugs.  I can't remember what they all
where, but one was the following:

In a class header file, we declared two variables like so:

...
 image *image1;
 image *image2;
...

If something was assigned to image2, the program seg faulted.  It we then
made the one change:

...
 image *image2;
 image *image1;
...

Then the assignment to image2 worked, but assignments to image1 seg faulted.

Andrew Certain
certain@cs.unc.edu
certain@sgi.com

None of this posting reflects the opinions of my employer.

andru@myth.rad.sgi.com (Andrew Myers) (06/23/91)

In article <32088@dime.cs.umass.edu> eli@smectos.CS.UMASS.EDU (Eli Brandt) writes:
>Out of curiosity, have you actually used a GNU compiler?  If so, could you
>specify some of the bugs with which it was "shot through".  Please, only note

Please read gnu.bug.g++. You will discover that I have personally posted
about 10 bugs which exist in all released g++ implementations. Two of
the bugs are so bad that they make g++ unusable for any serious work.
No patches seem to exist for these bugs. My program works perfectly on
AT&T C++.

In my case, I would have to say that g++ gave me significantly less than
what I paid for it.

Andrew