Latest changes in C11

c, c11, standards

Solution

I just learned today that there was one (somewhat) significant change between N1570 and the final C11 standard (ISO/IEC 9899:2011 (E)).

In N1570, 6.3.2p3 says:

Except when it is the operand of the `sizeof` operator, the `_Alignof` operator, or the unary `&` operator, or is a string literal used to initialize an array, an expression that has type "array of type" is converted to an expression with type "pointer to type" that points to the initial element of the array object and is not an lvalue.

The inclusion of `_Alignof` was an error, since the syntax of a unary-expression permits

_Alignof ( type-name )

but not

_Alignof unary-expression

The released C11 standard corrects this error and reverts to the C99 wording:

Except when it is the operand of the `sizeof` operator, or the unary `&` operator, or is a string literal used to initialize an array, an expression that has type "array of type" is converted to an expression with type "pointer to type" that points to the initial element of the array object and is not an lvalue.

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:

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.

Message-ID: `<rfg33a-u0q.ln1@jones.homeip.net>`

Here's the thread as seen on groups.google.com.

Problem

C1x has become ISO/IEC 9899:2011 aka C11. Does anyone know what changes (if any) there are in the Standard from the April 2011 draft n1570? ETA: There are the Committee minutes from London (March 2011) (which should be included in n1570) here, and from Washington, DC (October 2011) here; I suppose a list of accepted changes in the DC minutes should cover things.

Original source

Related problems