N1570 (C11) 6.3.2.1p3 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.
This adds one more exception to the rule for when arrays decay, or don't
decay, to pointers.
But the grammar for a "unary-expression" is, in part:
unary-expression:
[...]
sizeof unary-expression
sizeof ( type-name )
_Alignof ( type-name )
Unlike sizeof, there is no form of _Alignof that takes an expression as
an operand. Which means that the new exception in 6.3.2.1p3 can never
apply.
This was probably a simple oversight. Perhaps the committee intended at
one point to permit `_Alignof unary-expression`.
Conclusion: In spite of the extra wording in 6.3.2.1p3, the C11 rules
for when an array expression decays to a pointer are still exactly the
same as they were in C99 and C90.
A related issue: Why was `_Alignof unary-expression` excluded?
--
Keith Thompson (The_Other_Keith)
ks...@mib.org <
http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"