3 ms·
The "Specifier List" that precedes the declarator is made up of distinctive groups of keywords and people often mix them up because the language doesn't enforce
by bluetomcat 10y ago
The "Specifier List" that precedes the declarator is made up of distinctive groups of keywords and people often mix them up because the language doesn't enforce a particular order. My preference is to put them in the following order (it makes reading declarations much more natural):
1. Storage class specifiers, if any: static, extern, auto, register, typedef;
2. Type qualifiers, if any: const, volatile, restrict;
3. Type modifiers, if any: signed, unsigned, short, long;
4. The type specifier: int, double, char, etc.
Following that rule would lead to (IMHO) more readable declarations like this:
static const volatile unsigned long int a;
Instead of (an extreme example):
unsigned volatile int static const long a;