哪个是最好的C ++编译器? [英] Which is the best C++ compiler?

查看:128
本文介绍了哪个是最好的C ++编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++编译器可以产生不那么好的二进制文件吗?你可以在这里想到输出的鲁棒性和性能。有没有这样的事情作为最好的C ++编译器使用?如果没有,那么知名编译器(g ++,Intel C ++编译器,Visual C ++等)的优点和当然是不那么强的(已知的Bug和问题)。

Can a C++ compiler produce a not so good binary? You can think here of the output's robustness and performance. Is there such a thing as the "best" C++ compiler to use? If not, what are the strong points, and of course, the not-so-strong (known Bugs and Issues) points, of the well-known compilers (g++, Intel C++ Compiler, Visual C++, etc.).

有编译器生成错误输出导致任务关键型软件失败的记录案例

Are there documented cases when a compiler produced incorrect output which resulted in a failure of mission-critical software?

推荐答案

G ++似乎是最受欢迎的。它是免费的,便携和相当不错。

G++ seems to be the most popular. It's free, portable and quite good. The Windows port (MinGW) was really dated the last time I used it (maybe one year ago).

Intel C ++编译器被认为是生成最快的代码(但是,它知道它生成错误的SIMD代码为AMD处理器)。
你可以在非常严格的条件下在GNU / Linux上自由使用它。

我使用了一段时间,我喜欢它发出聪明的警告,而别人没有。

The Intel C++ compiler is considered as the one which generates the fastest code (however it's known that it generates bad SIMD code for AMD processors). You can use it freely on GNU/Linux under quite restrictive conditions.
I've used it for some time and I liked the fact that it emits clever warnings which others don't.

VC ++通常被认为是最好的C ++ IDE,从我听说编译器也是很好。它是免费的(如在免费啤酒),当然只能在Windows上。

如果你对Windows编程感兴趣,我建议这个编译器,因为它总是最新的,并提供更先进

VC++ is often regarded as the best C++ IDE, and from what I hear the compiler is quite good too. It's free (as in free beer), and only available on Windows of course.
If you are interested in Windows programming I would suggest this compiler, because it's always up-to-date and provides more advanced features for this purpose.

我建议在Windows上使用VC ++,对于其他操作系统使用G ++。

I would suggest VC++ on Windows, G++ for other OSes. Try the free version of I++ yourself, to see if it's worth the money.



有编译器生成不正确的输出,导致任务关键型软件失败的案例吗?

Are there documented cases when a compiler produced incorrect output which resulted in a failure of mission-critical software?

是的,大概,但我会说,大多数时候,它可能是程序员的错。例如,如果有人不知道浮点运算的工作原理,很容易写出不可靠的代码。一个好的程序员还必须知道什么是保证工作的C ++标准,什么不是。她还应该知道编译器的限制是什么。它如何实施标准,以及如何积极优化。

Yes, probably, but I'd say that most of the time it's probably the programmer's fault. For example, if someone doesn't know how floating-point arithmetic works, it's easy to write unreliable code. A good programmer must also know what is guaranteed to work by the C++ standard and what isn't. She should also know what are the limits of the compiler, e.g. how well it implements the standard and how aggressively it optimizes.

这篇关于哪个是最好的C ++编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆