GCC哪个版本支持C的2011,或者还没有支持到位?

中山野鬼 发布于 2012/06/25 15:44
阅读 1K+
收藏 0
如题。。。。
加载中
0
aoniao
aoniao

刚刚好像在一个网站看到有关这个,貌似都还没到位。

Clang 和 GCC 都是部分支持了。

链接

0
Michael_Yuan
Michael_Yuan
野鬼也来提问了?围观。
0
红薯
红薯

http://www.oschina.net/search?q=C%2B%2B11&scope=bbs

之前翻译了几篇文章,有介绍 gcc 的最新版本都是支持 C++11 ,但需要通过-c++0x 或者 -c++11 参数来启用

aoniao
aoniao
这个是C++的了,不是C的。
0
zcfox
zcfox

4.7的Changelog

There is support for some more features from the C11 revision of the ISO C standard. GCC now accepts the options -std=c11 and -std=gnu11, in addition to the previous -std=c1x and -std=gnu1x.
  • Unicode strings (previously supported only with options such as -std=gnu11, now supported with -std=c11), and the predefined macros __STDC_UTF_16__ and __STDC_UTF_32__.
  • Nonreturning functions (_Noreturn and <stdnoreturn.h>).
  • Alignment support (_Alignas, _Alignof, max_align_t, <stdalign.h>).
  • A built-in function __builtin_complex is provided to support C library implementation of the CMPLX family of macros.
话说C11有楼主看好的特性吗
0
中山野鬼
中山野鬼

引用来自“zcfox”的答案

4.7的Changelog

There is support for some more features from the C11 revision of the ISO C standard. GCC now accepts the options -std=c11 and -std=gnu11, in addition to the previous -std=c1x and -std=gnu1x.
  • Unicode strings (previously supported only with options such as -std=gnu11, now supported with -std=c11), and the predefined macros __STDC_UTF_16__ and __STDC_UTF_32__.
  • Nonreturning functions (_Noreturn and <stdnoreturn.h>).
  • Alignment support (_Alignas, _Alignof, max_align_t, <stdalign.h>).
  • A built-in function __builtin_complex is provided to support C library implementation of the CMPLX family of macros.
话说C11有楼主看好的特性吗
在琢磨_Alignof对代码的规划影响呢。哈。
0
deleted
deleted
野鬼居然这么潮.....
0
xunxun
xunxun

trunk和4.7分支

gcc-public和libstdc++邮件列表都有很多讨论

当然虽然是同一个版本,不同平台的功能也有出入

 

返回顶部
顶部