问题描述
Visual Studio 的最新版本改进了对 C99 的支持.最新版本 VS2017 现在支持所有 C99 了吗?
Recent versions of Visual Studio have seen improving support for C99. Does the latest version, VS2017, now support all of C99?
如果没有,C99 还缺少哪些功能?
If not, what features of C99 are still missing?
推荐答案
没有.
https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance
Visual Studio 2017 中编译器对 C99 预处理器规则的支持不完整.支持可变参数宏,但预处理器的行为存在许多错误.
https://docs.microsoft.com/en-us/cpp/build/walkthrough-compile-ac-program-on-the-command-line
Visual C++ C 编译器通常兼容 ISO C99 标准,但并不严格兼容.在大多数情况下,可移植的 C 代码将按预期编译和运行.Visual C++ 不支持 ISO C11 中的大部分更改.Visual C++ 编译器不推荐使用某些库函数和 POSIX 函数名称.支持这些功能,但首选名称已更改.有关详细信息,请参阅 CRT 和编译器警告(级别 3)C4996 中的安全功能.
请记住,Visual C++ 最终是 C++ 实现,而不是真正的 C 环境.兼容性是 C 和 C++ 共同遗产的一个很好的副作用,但尽管表面上语法相似,但两者是非常不同的语言.
Remember that Visual C++ is ultimately a C++ implementation and not a true C environment. The compatibility is a nice side-effect of C and C++’s shared heritage but despite superficial syntactical similarities the two are very different languages.
这篇关于Visual Studio 2017 是否完全支持 C99?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!