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

查看:311
本文介绍了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/zh- 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-命令行

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天全站免登陆