3 ms·
The working algorithm is that the postfix operators in declarators (just like in expressions) have higher precedence than the unary ones (just like in expressio
by kazinator 8y ago
The working algorithm is that the postfix operators in declarators (just like in expressions) have higher precedence than the unary ones (just like in expressions), but are overridable with parentheses (like in you know what).
The declared identifier is, first and foremost, the clump of high precedence postfix things that are on it:
a[3][4][5]; // a is an array of array of array
b(int); // b is a function
c(int)[3]; // c is an array of functions: nonexistent
Then we consider the unaries:
*** whatever; // whatever of pointer to pointer to pointer
Then the declaration specifiers:
int whatever; // whatever of/to int