87

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.

Is it a new ISO version like C11, or just a codename used by the GCC team for some corrections in their compiler ?

2
  • 3
    You are only allowed to publish up to a certain number (two?) of technical corrigendum (TC) to an ISO standard. If you need to make further correction after having already released x number of TC, a new version of the standard has to be released. I suspect that is the case here.
    – Lundin
    Nov 29, 2017 at 13:46
  • 3
    @Lundin: There were three TCs for C99 (incorporated into N1256). It's possible the rules have changed since then. Apr 20, 2018 at 15:50

2 Answers 2

69

According to GCC reference, C17 is actually a bug-fix version of the C11 standard with DR resolutions integrated.

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 for flag_isoc17 or any options for compatibility warnings; however, there is a new __STDC_VERSION__ value, so new cpplib languages CLK_GNUC17 and CLK_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 as C18, option aliases can be added. Note however that -std=iso9899:199409 corresponds to a __STDC_VERSION__ value rather than a publication date.)

(There are a couple of DR resolutions needing implementing in GCC, but that's independent of the new options.)

So, there are no new features included in C17.

The Cppreference (History of C) says:

Future development

C17 Next minor C language standard revision, will include all accepted C11 defect reports, but no new features.

UPDATE:

  • 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 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]

16
  • 3
    Then it's published by ISO, but it's just a bug-fix version. Thanks ! Nov 28, 2017 at 11:06
  • 13
    Just to complement that, there is actually one effective change proposed: the use of ATOMIC_VAR_INIT is no more mandatory for the initialization of atomic variables. Plain normal initialization suffices. Nov 28, 2017 at 13:12
  • 31
    For those who aren't used at reading standard gibberish: DR stands for Defect Report.
    – Lundin
    Nov 29, 2017 at 13:32
  • 1
    Does C17 yet unambiguously define the behavior of code that uses an aggregate member lvalue to access the storage of the aggregate? In every version to date, something like struct foo {int x;} s = {0}; s.x = 3; would write the storage associated with a struct foo using an lvalue of type int, but int is not one of the lvalue types that may be used to access a struct foo.
    – supercat
    Apr 25, 2018 at 17:34
  • 5
    The C17 standard is now available for purchase, although I'm not sure why ANSI has raised the price approximately 93% from $60 to $116. webstore.ansi.org/…
    – m0j0
    Apr 26, 2018 at 15:49
40

C17 is a “bugfix release” of the C standard how "M.S Chaudhari" noticed. However, there is very useful information prepared by Jens Gustedt the author of "Modern C" book.


He identified the following list of changes in C17 compared to C11:

Link to the main page C17.


Also, this content will be updated by Jens you can follow to update here Jeans Gustedt Blog.

P.S: before posting all this stuff I received approval from the author.

1
  • 2
    Very neat book; thanks. It's like an open-access, more systematic, in-depth version of Klemens's 21st Century C.
    – Geremia
    Dec 5, 2018 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.