Is “typedef” in between the type and the alias standard-conformant?

The typedef keyword is classified as a storage class specifier in C, though the standard explicitly remarks that that’s for convenience in expressing the formal language syntax. It nevertheless follows that typedef can appear in exactly the same places that any other storage class specifier, such as extern or static, can appear. [C2011, 6.7.1/5]

In fact, the syntax allows storage-class specifiers to be intermixed with type specifiers, type qualifiers, and other “declaration specifiers” in declarations. [C2011, 6.7/1, 6.7/6]

Thus, yes, it is valid to put the typedef keyword after the type name, as in your example.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)