3 ms·
In C99 there are some nice things over C89 that aren't new syntax, like initializing aggregates in automatic storage ("stack") with non-constant expressions:
by kazinator 4y ago
In C99 there are some nice things over C89 that aren't new syntax, like initializing aggregates in automatic storage ("stack") with non-constant expressions:
struct point p = { getx(obj), gety(obj) }; /* C90 error, C99 OK */
GCC had this as an extension before C99. Coding around that one can get ugly, and it's just a syntactic limitation.
Also, the C99 preprocessor is more powerful, with variadic support.
The macros I implemented in the cppawk project (awk with C preprocessor) would be impossible without C99. I was able to make a multi-clause loop macro, with user-definable clauses.
https://www.kylheku.com/cgit/cppawk/about/ https://www.kylheku.com/cgit/cppawk/about/