tags:

views:

499

answers:

6

Hi all,

I have been using gcc,g++ for my C,C++ application development till now and have found it to be amazing. But browsing through stackoverflow I found many members stating that error reporting in Comeau compiler is much more than any other compiler. Is this true? I haven't invested in any commercial release of a compiler. Is it really worth spending money on a commercial release of a C/C++ compiler when gcc,g++ are doing the trick?

A: 

I would tend to say no, g++ is a great compiler with a huge community supporting it, there really isn't any need to switch over to a commercial compiler unless you want the support it offers, which unless you're a large developer you probably don't. With g++ and VS Express on windows, there really isn't any need to dish out money for a compiler. Better places to spend your money/time!

DeusAduro
apart from the superior standards compliance, you mean?
jalf
A: 

I believe that Comeau Release version is pretty stable. When you buy commercial C/C++ compiler you'll pay mostly for specific features. You should decide whether you need those features.

If you don't have special requirements GNU C/C++ compiler is a great choice.

Kirill V. Lyadvinsky
+2  A: 

If you're happy with gcc tools, stick with them. Don't fix what's not broken. They're being used daily by lots of people, and they're certainly pretty good.

That said, gcc has been criticized for "getting slower with each release and creating crappy code". Don't know about the "crappiness", but we've been compiling time-critical sections with hardware vendor specific (e.g. Intel) compilers. They indeed create way faster code in some cases, compared to what gcc achieves. But usually the difference doesn't matter, though.

Joonas Pulakka
+5  A: 

The killer feature of the Comeau compiler is its conformance (including C++03!) and excellent error reporting.

There's an online way to try it out too: http://www.comeaucomputing.com/tryitout/

The Comeau compiler is definitely worth it if these features are worth it to you.

Hats off to the Comeau compiler!

Will
Don't forget portability.
MSalters
Just to highlight that, AFAIK, the Comeau compiler is implemented using the Edison Design Group (EDG) front end. I think a good part of the credit should go to EDG!
Richard Corden
+5  A: 

My experience with writing C++ is that compiling your code with more than one compiler is a great way to find odd corner-cases in your code. In our case, we've used gcc, Apple gcc, and the Visual Studio compiler cl (which is free). When on Windows, I prefer the cl compiler since it compiles faster (around five times faster for us) and it produces better code (around 30% faster last time I checked). Which compiler produces the fastest code is always dependent on the application though. In our particular case the Intel compiler is not so good at producing fast code contrary to popular opinion, so there is no real incentive to use it.

If we had the money to spend, compiling with Comeau would be nice to help with additional checking for standards conformance. Apart from that, I'm happy with the compilers we use.

Zayenz
+4  A: 

There are three main use of Comeau's compiler:

  • targeting platforms having only a C compiler

  • having an additional compiler with good conformance reputation and good error message

  • experimenting with features which are available only with it (experimenting with exported templates was my reason to buy it years ago for instance)

Note that debugging is not one of the use. It generates C code which is then compiled by your C compiler. It use #line directives so that you are able to go step by step in your code, but to do more, you'll have the same problem as when debugging any language using C as intermediate language: the debugger is not aware of the convention of the starting language.

AProgrammer