与gcc相比,comeau编译器值得吗?

时间:2021-12-22 07:03:35

I have been using gcc, g++ for my C, C++ application development till now and have found it to be amazing. But browsing through Stack Overflow 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?

到目前为止,我一直在使用gcc,g ++进行C,C ++应用程序开发,并发现它非常棒。但是浏览Stack Overflow我发现许多成员声称Comeau编译器中的错误报告比任何其他编译器都要多。这是真的?我没有投资任何编译器的商业版本。当gcc,g ++正在做的时候,真的值得花钱购买C / C ++编译器的商业版吗?

6 个解决方案

#1


7  

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.

我编写C ++的经验是,使用多个编译器编译代码是在代码中查找奇数角落的好方法。在我们的例子中,我们使用了gcc,Apple gcc和Visual Studio编译器cl(免费)。在Windows上,我更喜欢cl编译器,因为它编译速度更快(对我们来说快了大约五倍)并且它产生更好的代码(我上次检查时快了大约30%)。哪个编译器生成最快的代码总是依赖于应用程序。在我们的特定情况下,英特尔编译器在生成快速代码方面并不擅长与流行的观点相反,因此没有真正的动机来使用它。

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.

如果我们有钱可以花钱,那么使用Comeau进行编译将有助于进一步检查标准的一致性。除此之外,我对我们使用的编译器感到满意。

#2


8  

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

Comeau编译器的杀手级功能是它的一致性(包括C ++ 03!)和出色的错误报告。

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

还有一种在线方式可以尝试:http://www.comeaucomputing.com/tryitout/

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

如果这些功能对您有用,那么Comeau编译器绝对值得。

Hats off to the Comeau compiler!

向Comeau编译器致敬!

#3


5  

There are three main use of Comeau's compiler:

Comeau的编译器有三个主要用途:

  • targeting platforms having only a C compiler

    目标平台只有一个C编译器

  • 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.

请注意,调试不是其中一种用途。它生成C代码,然后由C编译器编译。它使用#line指令,以便您能够在代码中一步一步地执行,但是为了做更多,您将遇到与使用C作为中间语言调试任何语言时相同的问题:调试器不了解约定起始语言。

#4


2  

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.

如果您对gcc工具感到满意,请坚持使用它们。不要修复没有破坏的东西。很多人每天都在使用它们,而且它们确实非常好。

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.

也就是说,gcc一直被批评为“每次发布都会变慢,并创建糟糕的代码”。不知道“疯狂”,但我们一直在用硬件厂商特定的(例如英特尔)编译器编译时间关键部分。与gcc实现的相比,它们确实在某些情况下创建了更快的代码。但通常差异并不重要。

#5


1  

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!

我倾向于说不,g ++是一个很好的编译器,有一个庞大的社区支持它,除非你想要它提供的支持,否则没有任何需要切换到商业编译器,除非你是一个大开发者你可能不会。在Windows上使用g ++和VS Express,确实没有必要为编译器提供资金。更好的地方花你的钱/时间!

#6


0  

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.

我相信Comeau Release版本非常稳定。当您购买商业C / C ++编译器时,您将主要为特定功能付费。您应该决定是否需要这些功能。

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

如果您没有特殊要求,GNU C / C ++编译器是一个很好的选择。

#1


7  

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.

我编写C ++的经验是,使用多个编译器编译代码是在代码中查找奇数角落的好方法。在我们的例子中,我们使用了gcc,Apple gcc和Visual Studio编译器cl(免费)。在Windows上,我更喜欢cl编译器,因为它编译速度更快(对我们来说快了大约五倍)并且它产生更好的代码(我上次检查时快了大约30%)。哪个编译器生成最快的代码总是依赖于应用程序。在我们的特定情况下,英特尔编译器在生成快速代码方面并不擅长与流行的观点相反,因此没有真正的动机来使用它。

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.

如果我们有钱可以花钱,那么使用Comeau进行编译将有助于进一步检查标准的一致性。除此之外,我对我们使用的编译器感到满意。

#2


8  

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

Comeau编译器的杀手级功能是它的一致性(包括C ++ 03!)和出色的错误报告。

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

还有一种在线方式可以尝试:http://www.comeaucomputing.com/tryitout/

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

如果这些功能对您有用,那么Comeau编译器绝对值得。

Hats off to the Comeau compiler!

向Comeau编译器致敬!

#3


5  

There are three main use of Comeau's compiler:

Comeau的编译器有三个主要用途:

  • targeting platforms having only a C compiler

    目标平台只有一个C编译器

  • 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.

请注意,调试不是其中一种用途。它生成C代码,然后由C编译器编译。它使用#line指令,以便您能够在代码中一步一步地执行,但是为了做更多,您将遇到与使用C作为中间语言调试任何语言时相同的问题:调试器不了解约定起始语言。

#4


2  

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.

如果您对gcc工具感到满意,请坚持使用它们。不要修复没有破坏的东西。很多人每天都在使用它们,而且它们确实非常好。

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.

也就是说,gcc一直被批评为“每次发布都会变慢,并创建糟糕的代码”。不知道“疯狂”,但我们一直在用硬件厂商特定的(例如英特尔)编译器编译时间关键部分。与gcc实现的相比,它们确实在某些情况下创建了更快的代码。但通常差异并不重要。

#5


1  

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!

我倾向于说不,g ++是一个很好的编译器,有一个庞大的社区支持它,除非你想要它提供的支持,否则没有任何需要切换到商业编译器,除非你是一个大开发者你可能不会。在Windows上使用g ++和VS Express,确实没有必要为编译器提供资金。更好的地方花你的钱/时间!

#6


0  

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.

我相信Comeau Release版本非常稳定。当您购买商业C / C ++编译器时,您将主要为特定功能付费。您应该决定是否需要这些功能。

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

如果您没有特殊要求,GNU C / C ++编译器是一个很好的选择。