Title
typedef with no declarator
Status
cd4
Section
9.2.4 [dcl.typedef]
Submitter
Richard Smith

Created on 2014-01-16.00:00:00 last changed 49 months ago

Messages

Date: 2015-09-15.00:00:00

Proposed resolution (September, 2015):

Change 9.2.4 [dcl.typedef] paragraph 1 as follows:

Declarations containing the decl-specifier typedef declare identifiers that can be used later for naming fundamental (6.8.2 [basic.fundamental]) or compound (6.8.3 [basic.compound]) types. The typedef specifier shall not be combined in a decl-specifier-seq with any other kind of specifier except a type-specifier, and it shall not be used in the decl-specifier-seq of a parameter-declaration (9.3.4.6 [dcl.fct]) nor in the decl-specifier-seq of a function-definition (9.5 [dcl.fct.def]). If a typedef specifier appears in a declaration without a declarator, the program is ill-formed.
Date: 2016-02-15.00:00:00

[Adopted at the February, 2016 meeting.]

There should be a rule to prohibit the almost certainly erroneous declaration

  typedef struct X { };    // Missing declarator
History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: tentatively ready -> cd4
2015-11-10 00:00:00adminsetmessages: + msg5596
2015-11-10 00:00:00adminsetstatus: drafting -> tentatively ready
2014-01-16 00:00:00admincreate