Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I just learned today that there was one (somewhat) significant change between N1570 and the final C11 standard (ISO/IEC 9899:2011 (E)).</p> <p>In N1570, 6.3.2p3 says:</p> <blockquote> <p>Except when it is the operand of the <code>sizeof</code> operator, the <code>_Alignof</code> operator, or the unary <code>&amp;</code> operator, or is a string literal used to initialize an array, an expression that has type "array of <em>type</em>" is converted to an expression with type "pointer to <em>type</em>" that points to the initial element of the array object and is not an lvalue.</p> </blockquote> <p>The inclusion of <code>_Alignof</code> was an error, since the syntax of a <em>unary-expression</em> permits</p> <pre><code>_Alignof ( type-name ) </code></pre> <p>but not</p> <pre><code>_Alignof unary-expression </code></pre> <p>The released C11 standard corrects this error and reverts to the C99 wording:</p> <blockquote> <p>Except when it is the operand of the <code>sizeof</code> operator, or the unary <code>&amp;</code> operator, or is a string literal used to initialize an array, an expression that has type "array of <em>type</em>" is converted to an expression with type "pointer to <em>type</em>" that points to the initial element of the array object and is not an lvalue.</p> </blockquote> <p>More information: in a recent posting to comp.std.c about differences between N1570 and the released standard, Larry Jones, a member of the ISO C committee, wrote:</p> <blockquote> <p>There are a number of them, but most are just minor editorial tweaks, changes to boilerplate text, and shuffling things around to keep the powers that be happy. The biggest change was removing _Alignof from a bunch of places it shouldn't have been added (based on the erroneous notion that it takes either a type or an expression like sizeof does when it really only takes a type): 6.3.2.1p2, p3, p4, fn. 65; and 6.7.1 fn. 121.</p> </blockquote> <p>Message-ID: <code>&lt;rfg33a-u0q.ln1@jones.homeip.net&gt;</code></p> <p>Here's <a href="https://groups.google.com/forum/?fromgroups=#!topic/comp.std.c/v5hsWOu5vSw">the thread</a> as seen on groups.google.com.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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