4 ms·
That isn't really a viable solution, because C doesn't allow parentheses around blocks. Calling `describe(foo, ({ int a, b; }))` would make the preprocessor ha
by mort96 9y ago
That isn't really a viable solution, because C doesn't allow parentheses around blocks.
Calling `describe(foo, ({ int a, b; }))` would make the preprocessor happy, but it would also produce invalid syntax:
void test_foo() ({ int a, b; })
- cryptonector 9y agoTsk tsk, if you're going to know about label values and other GCC C extensions, you might as well know about statement expressions (another GCC C extension). `({ <statements> })` is an expression. Naturally, Clang also supports statement expressions... EDIT: I highly recommend spending some time reading about all the various GCC C extensions, and what compilers support them (typically Clang, but also Sun Studio, if that's still around..., and maybe others). There are quite a few very useful ones.