3 ms·
A lesser-known quirk about typedef is that syntactically, it is treated like any other storage-class specifier (static, extern, register, auto). Since the order
by bluetomcat 10y ago
A lesser-known quirk about typedef is that syntactically, it is treated like any other storage-class specifier (static, extern, register, auto). Since the ordering of storage-class specifiers is insignificant to the rest of the specifiers, it means that the following statements have the same effect:
typedef int myint;
int typedef myint;
The only difference here compared to a normal declaration is that the name "myint" defines a type and not an "object" as per the standard.
- nneonneo 10y agoI've been programming C for the better part of my life now, and I've _never_ seen this. Neat!
- beeforpork 10y agoWow!