How to use compound literals to `fprintf()` multiple formatted numbers with arbitrary bases?

C99 C11 introduced compound literals which allow not only a complicated initialized structure, but also an “in-line” variable. Code can call a conversion function and pass in a new buffer (char [UTOA_BASE_N]){0} per each function call allowing the function to return that same buffer, now written as needed that is still within its lifetime. The … Read more

Are compound literals Standard C++?

This is an extension that both gcc and clang support. The gcc document says: As an extension, GCC supports compound literals in C90 mode and in C++, though the semantics are somewhat different in C++. if you build with -pedantic you should receive a warning, for example clang says (see it live): warning: compound literals … Read more