Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>ISO has ratified and published as ISO/IEC 9899:2011 the new C11 (C1x) standard for the C programming language. The major changes from the previous standard (C99), as written in the <a href="http://en.wikipedia.org/wiki/C11_(C_standard_revision)#Changes_from_C99" rel="nofollow">C11 Wikipedia article</a>, are the following:</p> <blockquote> <p>The standard includes several changes to the C99 language and library specifications, such as:</p> <ul> <li>Alignment specification (<code>_Alignas</code> specifier, <code>_Alignof</code> operator, <code>aligned_alloc</code> function, <code>&lt;stdalign.h&gt;</code> header file)</li> <li>The <code>_Noreturn</code> function specifier</li> <li><p>Type-generic expressions using the <code>_Generic</code> keyword. For example, the following macro <code>cbrt(x)</code> translates to <code>cbrtl(x)</code>, <code>cbrt(x)</code> or <code>cbrtf(x)</code> depending on the type of <code>x</code>:</p> <pre><code> #define cbrt(X) _Generic((X), long double: cbrtl, \ default: cbrt, \ float: cbrtf)(X) </code></pre></li> <li>Multithreading support (<code>_Thread_local</code> storage-class specifier, <code>&lt;threads.h&gt;</code> header including thread creation/management functions, mutex, condition variable and thread-specific storage functionality, as well as the <code>_Atomic</code> type qualifier and <code>&lt;stdatomic.h&gt;</code> for uninterruptible object access).</li> <li>Improved Unicode support based on the C Unicode Technical Report ISO/IEC TR 19769:2004 (<code>char16_t</code> and <code>char32_t</code> types for storing UTF-16/UTF-32 encoded data, including conversion functions in <code>&lt;uchar.h&gt;</code> and the corresponding <code>u</code> and <code>U</code> string literal prefixes, as well as the <code>u8</code> prefix for UTF-8 encoded literals).</li> <li>Removal of the <code>gets</code> function, deprecated in the previous C language standard revision, ISO/IEC 9899:1999/Cor.3:2007(E), in favor of a new safe alternative, <code>gets_s</code>.</li> <li>Bounds-checking interfaces (Annex K).</li> <li>Analyzability features (Annex L).</li> <li>More macros for querying the characteristics of floating point types, concerning subnormal floating point numbers and the number of decimal digits the type is able to store.</li> <li>Anonymous <em>structures</em> and <em>unions</em>, useful when unions and structures are nested, e.g. in <code>struct T { int tag; union { float x; int n; }; };</code>.</li> <li>Static assertions, which are evaluated during translation at a later phase than <code>#if</code> and <code>#error</code>, when types are understood by the translator.</li> <li>An exclusive create-and-open mode (<code>"…x"</code> suffix) for <code>fopen</code>. This behaves like <code>O_CREAT|O_EXCL</code> in POSIX, which is commonly used for lock files.</li> <li>The <code>quick_exit</code> function as a third way to terminate a program, intended to do at least minimal deinitializition if termination with <code>exit</code> fails.</li> <li>Macros for the construction of complex values (partly because <code>real + imaginary*I</code> might not yield the expected value if <code>imaginary</code> is infinite or NaN).</li> </ul> </blockquote> <p>From the ISO site you can buy the <a href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=57853" rel="nofollow">full published standard</a>. Here is an abstract taken from the ISO site:</p> <blockquote> <p>ISO/IEC 9899:2011 specifies the form and establishes the interpretation of programs written in the C programming language. It specifies</p> <ul> <li>the representation of C programs;</li> <li>the syntax and constraints of the C language;</li> <li>the semantic rules for interpreting C programs;</li> <li>the representation of input data to be processed by C programs;</li> <li>the representation of output data produced by C programs;</li> <li>the restrictions and limits imposed by a conforming implementation of C.</li> </ul> <p>ISO/IEC 9899:2011 does not specify</p> <ul> <li>the mechanism by which C programs are transformed for use by a data-processing system;</li> <li>the mechanism by which C programs are invoked for use by a data-processing system;</li> <li>the mechanism by which input data are transformed for use by a C program;</li> <li>the mechanism by which output data are transformed after being produced by a C program;</li> <li>the size or complexity of a program and its data that will exceed the capacity of any specific data-processing system or the capacity of a particular processor;</li> <li>all minimal requirements of a data-processing system that is capable of supporting a conforming implementation. ISO/IEC 9899:2011 is designed to promote the portability of C programs among a variety of data-processing systems. It is intended for use by implementers and programmers.</li> </ul> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload