This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Accepted as a DR at the June, 2021 meeting.]
According to 126.96.36.199 [dcl.array] paragraph 1,
In a declaration T D where D has the form
D1 [ constant-expressionopt ] attribute-specifier-seqopt
and the type of the identifier in the declaration T D1 is “derived-declarator-type-list T”, then the type of the identifier of D is an array type; if the type of the identifier of D contains the auto type-specifier, the program is ill-formed.
This formulation forbids useful constructs like
int a; auto (*p) = &a;
(accepted by current implementations) and should be relaxed to accommodate such cases.
Notes from the February, 2019 meeting:
CWG agreed that the example should be accepted.
Notes from the May 25, 2021 teleconference:
It was observed that CWG rejected the same example as being "not a defect" in considering issue 1222. However, the use of auto has significantly expanded since that time and the prohibition of such declarations now seems inconsistent.
Proposed resolution, May, 2021:
Change 188.8.131.52 [dcl.array] paragraph 4 as follows:
U is called the array element type; this type shall not be
a placeholder type (184.108.40.206 [dcl.spec.auto]),a reference type, a function type, an array of unknown bound, or cv void.
Change 220.127.116.11 [dcl.fct] paragraph 11 as follows:
The return type shall be a non-array object type, a reference type, or cv void.
Change 18.104.22.168.2 [dcl.type.auto.deduct] paragraph 2 as follows:
A type T containing a placeholder type, and a corresponding initializer E, are determined as follows:
for a non-discarded return statement that occurs in a function declared with a return type that contains a placeholder type, T is the declared return type and E is the operand of the return statement. If the return statement has no operand, then E is void();
for a variable declared with a type that contains a placeholder type, T is the declared type of the variable and E is the initializer. If the initialization is direct-list-initialization, the initializer shall be a braced-init-list containing only a single assignment-expression and E is the assignment-expression;
for a non-type template parameter declared with a type that contains a placeholder type, T is the declared type of the non-type template parameter and E is the corresponding template argument.
In the case of a return statement with no operand...