在MS Visual Studio中的编译器哪个C99功能? [英] Which C99 features are available in the MS Visual Studio compiler?

查看:174
本文介绍了在MS Visual Studio中的编译器哪个C99功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是众所周知,微软的Visual Studio的编译器不支持C99,它看起来像他们有没有计划支持

不过,编译器包含了一些樱桃采摘功能,如复杂的宏和长长 - 看到<一个引号href=\"http://stackoverflow.com/questions/146381/visual-studio-support-for-new-c-c-standards/146419#146419\">this回答:


  

在哪里我们已经收到许多要求对某些C99功能,我们已经尝试实现它们(或类似物)。一对夫妇的例子是复杂的宏,长长 __杂 __功能__ __限制。如果还有其他​​的,你会在工作中找到有用的C99的功能,让我们知道!我们没有听到来自我们的C用户多,所以说起来,使自己听到


  
  

- 阿琼Bijanki,在ISO C标准委员会微软重新presentative <一个href=\"http://blogs.msdn.com/b/vcblog/archive/2007/11/05/iso-c-standard-update.aspx\">http://blogs.msdn.com/b/vcblog/archive/2007/11/05/iso-c-standard-update.aspx


此外,Visual Studio中的较新版本似乎与一些由C99 所需的头。

有许多关于特定功能的问题 - 但我wan't知道的是:我在哪里可以找到支持的功能/当前MSVC编译器提供的C99名单

我在寻找名单像这样的海合会


解决方案

我相信C99的(这不是在C90)唯一的非库的语言特性在MSVC支持是 // 的意见。除此之外,在C模式下编译时,唯一的C99功能,你会得到是由于微软带来了,因为这些功能是在C ++标准/标准草案/ TR的MS编译器支持C99带来库功能。例如,在2010年得到了VS stdint.h ,因为它是在C ++ TR1草案。

微软已经明确表示,他们看到市场上没有强推来分配资源,以支持C99的MSVC,所以它几乎可以肯定,C99的你会发现在MSVC的C编译器模式下看到的唯一的部分是那些获得带来因为在C ++的。

一个事情的 I 的发现令人沮丧的是,这一直是C ++的一部分,很长一段时间非图书馆的C99语言功能是不是在C模式下可用。就个人而言,我会觉得很有益的,如果只是为了混合使用的声明语句能力C99编译C code时的支持。

但似乎语言功能,你在MSVC C见今天是什么,你会从这里得到的。

It's well known that Microsoft's Visual Studio compiler does not support C99, and it looks like they have no plans to support it.

However, the compiler does include some cherry picked features such as variadic macros and long long - see the quotes in this answer:

Where we’ve received many requests for certain C99 features, we’ve tried to implement them (or analogues). A couple examples are variadic macros, long long, __pragma, __FUNCTION__, and __restrict. If there are other C99 features that you’d find useful in your work, let us know! We don’t hear much from our C users, so speak up and make yourselves heard

-- Arjun Bijanki, Microsoft’s representative on the ISO C standard committee http://blogs.msdn.com/b/vcblog/archive/2007/11/05/iso-c-standard-update.aspx

Additionally, newer versions of Visual Studio seem to ship with some of the headers required by C99.

There are lots of questions about specific features - but what I wan't to know is: Where can I find a list of the C99 features supported/provided by the current MSVC compiler?

I'm looking for a list like this one for gcc.

解决方案

I believe that the only non-library language feature of C99 (that's not in C90) supported in MSVC is // comments. Other than that when compiling in C mode, the only C99 features you'll get are due to C99 library features that Microsoft has brought in because those features were brought in the C++ standard/draft standard/TR that the MS compiler was supporting. For example, you got stdint.h in VS 2010 because it was in the C++ TR1 draft.

Microsoft has made it clear that they see no strong push from the market to allocate resources to support C99 in MSVC, so it's almost certain that the only parts of C99 you'll see in MSVC's C compiler mode are those that get brought in because of C++.

One of things that I find frustrating is that non-library C99 language features that have been part of C++ for a long time are not available in C mode. Personally, I'd find it very helpful if just the C99 ability to mix statements with declarations were supported when compiling C code.

But it seems that the language features you see in C with MSVC today is what you'll get from here on.

这篇关于在MS Visual Studio中的编译器哪个C99功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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