Re:C – Preliminary C2x Charter
by colanderman on Thursday March 17, 2016 @12:27PM
(#11305414)
If you're using GNU C:
[ Parent
| on HN ]
Or, as of GCC 4.9 and Clang 3.8, just use __auto_type. It avoids duplicating the source expression, which duplicates compiler errors if the expression is erroneous and can actually repeat side effects in the rare cases involving variable-length arrays.