什么是C17,并且对该语言进行了哪些更改? [英] What is C17 and what changes have been made to the language?
问题描述
As I was checking news about GCC 8, I saw that they added support for the 2017 version of the C language (not C++17, really C17). But I can't find any information about it on Internet.
是像C11这样的新ISO版本,还是GCC团队在其编译器中进行某些更正的代号?
推荐答案
According to GCC reference, C17
is actually a bug-fix version of the C11
standard with DR resolutions integrated.
C17 ,具有DR [缺陷报告]分辨率的C11标准的错误修复版本 集成,将很快进行投票.该补丁添加了对应的 选项
-std=c17
,-std=gnu17
(新的默认版本,已替换-std=gnu11
作为默认值),-std=iso9899:2017
.作为错误修复版本 的标准,不需要flag_isoc17
或任何其他选项 兼容性警告;但是,有一个新的__STDC_VERSION__
值,因此将新的cpplib语言CLK_GNUC17
和CLK_STDC17
添加到 支持通过新选项使用该新值. (如果标准 最终于2018年发布,被称为C18
,选项别名 可以添加.但是请注意,-std=iso9899:199409
对应于__STDC_VERSION__
值而不是发布日期.)
C17, a bug-fix version of the C11 standard with DR [Defect Report] resolutions integrated, will soon go to ballot. This patch adds corresponding options
-std=c17
,-std=gnu17
(new default version, replacing-std=gnu11
as the default),-std=iso9899:2017
. As a bug-fix version of the standard, there is no need forflag_isoc17
or any options for compatibility warnings; however, there is a new__STDC_VERSION__
value, so new cpplib languagesCLK_GNUC17
andCLK_STDC17
are added to support using that new value with the new options. (If the standard ends up being published in 2018 and being known asC18
, option aliases can be added. Note however that-std=iso9899:199409
corresponds to a__STDC_VERSION__
value rather than a publication date.)
(在GCC中需要实施几个DR决议,但是 这与新选项无关.)
(There are a couple of DR resolutions needing implementing in GCC, but that's independent of the new options.)
因此,C17不包含任何新功能.
So, there are no new features included in C17.
未来发展
C17 下一个较小的C语言标准修订版,将包括所有接受的C11缺陷报告,但没有新功能.
C17 Next minor C language standard revision, will include all accepted C11 defect reports, but no new features.
更新:
- 2018: C17 (ISO/IEC 9899:2018) (ISO Store) (Final draft) Includes the deprecation of
ATOMIC_VAR_INIT
and the fixes to the following defect reports:
[DR 400] , [DR 401] , [DR 402] , [DR 404] , [DR 405] , [DR 407] , [DR 410] , [DR 412] , [DR 415] , [DR 416] , [DR 417] , [DR 423] , [DR 426] , [DR 428] , [DR 430] , [DR 431] , [DR 433] , [DR 436] , [DR 437] , [DR 438] , [DR 441] , [DR 444] , [DR 445] , [DR 448] , [DR 450] , [DR 452] , [DR 457] , [DR 458] , [DR 459] , [DR 462] , [DR 464] , [DR 465] , [DR 470] , [DR 471] , [DR 472] , [DR 475] , [DR 477] , [DR 480] , [DR 485] , [DR 487] , [DR 491]
[DR 400], [DR 401], [DR 402], [DR 403], [DR 404], [DR 405], [DR 406], [DR 407], [DR 410], [DR 412], [DR 414], [DR 415], [DR 416], [DR 417], [DR 419], [DR 423], [DR 426], [DR 428], [DR 429], [DR 430], [DR 431], [DR 433], [DR 434], [DR 436], [DR 437], [DR 438], [DR 439], [DR 441], [DR 444], [DR 445], [DR 447], [DR 448], [DR 450], [DR 452], [DR 453], [DR 457], [DR 458], [DR 459], [DR 460], [DR 462], [DR 464], [DR 465], [DR 468], [DR 470], [DR 471], [DR 472], [DR 473], [DR 475], [DR 477], [DR 480], [DR 481], [DR 485], [DR 487], [DR 491]
这篇关于什么是C17,并且对该语言进行了哪些更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!