选择较新的 gcc 版本进行升级

发布于 2024-09-07 00:59:35 字数 216 浏览 1 评论 0原文

我在 CentOS 5.4 上开发 C++ 应用程序,我们在使用 gcc 4.1.2 时遇到了一些不方便的情况,例如无法在类构造函数中调试局部变量,这是一个已确认的 gcc bug(与作用域变量相同的问题)。 我正在考虑升级到更高的 gcc 版本。生产环境应该选择什么版本?我可以简单地从 gcc.org 获取最新版本,构建它并开始使用它吗?我应该只使用 CentOS 存储库中的 rpm 吗?

谢谢。

I develop C++ applications on CentOS 5.4 and we came across several inconvenient situations with gcc 4.1.2 like inability to debug local variables in class constructor which is a confirmed gcc bug (same problem with scoped variables).
I'm considering to upgrade to higher gcc version. What version should I choose for production environment? Can I simply grab the latest release from gcc.org, build it and start using it? Should I only use the rpms from CentOS repositories?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墟烟 2024-09-14 00:59:35

如果您的发行版的存储库提供了您想要的内容,则始终建议您使用它们。要查看特定的 GCC 版本是否可以解决您的问题,您可以随时查看主页(右侧)。我相信 GCC 的发布标准并使用最新的稳定版本(撰写本文时为 4.5)。如果您遇到问题,请切换到较低版本 (4.4),如果不起作用,请使用 4.3。如果您不喜欢反复试验,请参阅回归列表,或者找到您遇到问题的错误并查看它何时被修复。

PS:我知道 4.4.4 是最新版本,但 4.5 是最新的主要版本。

It is always recommended to use your distribution's repositories if they provide what you want. To see if a specific GCC version fixes your problems, you can always check out the "regressions" on the home page (right side). I would trust the release criteria for GCC and use the latest stable release (4.5 at the time of writing). If you have trouble with it, switch to a version lower (4.4), and if that doesn't work, use 4.3. If you don't like trial and error, see the regression lists, or find the bug you've been having trouble with and see when it was fixed.

PS: I know 4.4.4 is the latest release, but 4.5 is the newest major release.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文