gpt4 book ai didi

c - Visual Studio 2017 是否完全支持 C99?

转载 作者:太空狗 更新时间:2023-10-29 16:59:54 28 4
gpt4 key购买 nike

最新版本的 Visual Studio 改进了对 C99 的支持。最新版本VS2017现在支持所有的C99了吗?

如果不是,C99 还缺少哪些功能?

最佳答案

没有。

https://learn.microsoft.com/en-us/cpp/visual-cpp-language-conformance

The compiler’s support for C99 Preprocessor rules is incomplete in Visual Studio 2017. Variadic macros are supported, but there are many bugs in the preprocessor’s behavior.

https://learn.microsoft.com/en-us/cpp/build/walkthrough-compile-a-c-program-on-the-command-line

The Visual C++ C compiler is generally compatible with the ISO C99 standard, but not strictly compliant. In most cases, portable C code will compile and run as expected. Visual C++ does not support most of the changes in ISO C11. Certain library functions and POSIX function names are deprecated by the Visual C++ compiler. The functions are supported, but the preferred names have changed. For more information, see Security Features in the CRT and Compiler Warning (level 3) C4996.

请记住,Visual C++ 最终是一个 C++ 实现,而不是真正的 C 环境。兼容性是 C 和 C++ 共享传统的一个很好的副作用,但尽管表面语法相似,但两者是非常不同的语言。

关于c - Visual Studio 2017 是否完全支持 C99?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48615184/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com