Visual Studio 2017 是否完全支持 C99? [英] Does Visual Studio 2017 fully support C99?

查看:100
本文介绍了Visual Studio 2017 是否完全支持 C99?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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 预处理器规则的支持不完整.支持可变参数宏,但预处理器的行为存在许多错误.

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://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 中的安全功能.

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++ 共同遗产的一个很好的副作用,但尽管表面上语法相似,但两者是非常不同的语言.

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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