CWG Issue 1830 (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


1830. Repeated specifiers

Section: 9.1 [dcl.pre]Status: CD4Submitter: Ville VoutilainenDate: 2014-01-10

[Moved to DR at the November, 2014 meeting.]

Although repeated _type-specifier_s such as constare forbidden, there is no such prohibition against repeated non-type specifiers like constexpr and virtual. Should there be?

On the “con” side, it's not clear that such a prohibition actually helps anyone; it could happen via macros, and a warning about non-macro use could be a QoI issue. Also, C99 moved in the opposite direction, removing the prohibition against repeated cv-qualifiers.

Proposed resolution (February, 2014):

Add the following as a new paragraph before 9.2 [dcl.spec] paragraph 2:

Each decl-specifier shall appear at most once in the complete decl-specifier-seq of a declaration, except thatlong may appear twice.

If a type-name is encountered...