[dcl.type.general] (original) (raw)
9 Declarations [dcl]
9.2 Specifiers [dcl.spec]
9.2.9 Type specifiers [dcl.type]
9.2.9.1 General [dcl.type.general]
Theattribute-specifier-seq affects the type only for the declaration it appears in, not other declarations involving the same type.
As a general rule, at most onedefining-type-specifieris allowed in the completedecl-specifier-seq of a declaration or in adefining-type-specifier-seq, and at most onetype-specifieris allowed in atype-specifier-seq.
The only exceptions to this rule are the following:
- const can be combined with any type specifier except itself.
- volatile can be combined with any type specifier except itself.
- signed or unsigned can be combined withchar, long, short, or int.
- short or long can be combined with int.
- long can be combined with double.
- long can be combined with long.
Except in a declaration of a constructor, destructor, or conversion function, at least one defining-type-specifier that is not acv-qualifier shall appear in a completetype-specifier-seq or a completedecl-specifier-seq.74
[Note 1:
The remainingtype-specifiers are discussed in the rest of [dcl.type].
— _end note_]