CWG Issue 1930 (original) (raw)

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-11-05


1930.init-declarator-list vs member-declarator-list

Section: 9.2.2 [dcl.stc]Status: CD4Submitter: Richard SmithDate: 2014-05-19

[Adopted at the February, 2016 meeting.]

According to 9.2.2 [dcl.stc] paragraph 1,

If a storage-class-specifier appears in a decl-specifier-seq, there can be no typedef specifier in the same decl-specifier-seq and the init-declarator-list of the declaration shall not be empty...

This obviously should apply to mutable but does not because mutable applies to _member-declarator-list_s, not _init-declarator-list_s. Similarly, in 9.2.9.2 [dcl.type.cv] paragraph 1,

If a cv-qualifier appears in a decl-specifier-seq, the init-declarator-list of the declaration shall not be empty.

this should apply to member declarations as well.

Proposed resolution (October, 2015):

  1. Change 9.2.2 [dcl.stc] paragraph 1 as follows:

...If a storage-class-specifier appears in a decl-specifier-seq, there can be no typedef specifier in the same decl-specifier-seq and the init-declarator-list or _member-declarator-list_of the declaration shall not be empty (except for an anonymous union declared in a named namespace or in the global namespace, which shall be declared static(11.5 [class.union])). The _storage-class-specifier_applies...

  1. Change 9.2.9.2 [dcl.type.cv] paragraph 1 as follows:

...If a cv-qualifier appears in a decl-specifier-seq, the init-declarator-list or member-declarator-list of the declaration shall not be empty. [Note:...

Additional note, November, 2014:

The preceding resolution, which was advanced to "tentatively ready" status during the review session following the November, 2014 (Urbana) meeting, introduces an apparently unintentional conflict with 11.5 [class.union] paragraph 6 regarding the requirements for anonymous unions in unnamed namespaces and has been returned to "review" status to allow further discussion.

Notes from the October, 2015 meeting:

The proposed resolution was changed to address the preceding concern.