alloca 是 C++ 的一部分吗?标准?

发布于 2024-08-22 05:20:58 字数 28 浏览 1 评论 0原文

alloca 是 C++ 标准的一部分吗?

Is alloca part of the C++ standard?

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

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

发布评论

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

评论(2

北凤男飞 2024-08-29 05:20:58

不,答案说明了一切。

No. The answer says it all.

审判长 2024-08-29 05:20:58

它不仅不是 C++ 标准的一部分,而且不是任何标准的一部分。它不是 C 的一部分,也不是 POSIX 的一部分。此外,请允许我引用 Linux 手册页中的 alloca(3)

alloca() 函数是机器函数并且
依赖于编译器。在许多系统上
它的实现是有缺陷的。 它的用途
不鼓励

(强调已添加)

Not only is it not part of the C++ standard, it is not part of any standard. It's not part of C nor is it part of POSIX. Furthermore, allow me to quote from the Linux man page for alloca(3):

The alloca() function is machine and
compiler dependent. On many systems
its implementation is buggy. Its use
is discouraged
.

(emphasis added)

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