[cfe-dev] Potential feature request: fully anonymous tuples/multiple return in C

M Farkas-Dyck strake888 at gmail.com
Thu Jun 12 15:58:07 PDT 2014


One feature that C glaringly and bothersomely lacks, but LLVM has, is
multiple return, so in C one must often use cumbersome pointer tricks
to effectively return other values. I would like this feature in
Clang, which already has nonymous multiple return, so it ought to be
readily feasible. I'm not sure what syntax would be appropriate;
"(x,y,z)", common in other languages, is already used in C, so perhaps
"tuple {x,y,z}" would work.

I might add this myself, but I'm a C programmer, not a C++ programmer,
and reading the Clang source code I am soon lost. How difficult would
this be? What would one have to modify?



More information about the cfe-dev mailing list