Re:Having fun abusing the C language
by bluetomcat on Tuesday October 25, 2016 @10:44AM
(#12788412)
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:
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.
[ Parent
| on HN ]
I've been programming C for the better part of my life now, and I've _never_ seen this. Neat!
Re:Having fun abusing the C language
by beeforpork on Tuesday October 25, 2016 @04:35PM
(#12791436)
Wow!