Which modern compilers support the Gnu Statement expression (C and C++ languages). What versions should I have to use a statement expressions?
Statement expression is smth like ({ code; code; retval })
:
int b=56;
int c=({int a; a=sin(b); a;});
I already know some such compilers:
- GCC >=3
- Clang/LLVM >= 3.0.0
- Intel C++ Compiler >= 6.0 (Linux version, check page 4; bit limited)
- Sun Studio >= 12 (New Language Extensions)
- IBM XL for z/OS (marked as IBM extension)
- Open64 (as it uses osprey-gcc frontend)
This compiler seems not to support this (i'm unsure):
- MS Visual C++
PS. some C/C++ compilers are listed here but I interested only in mature compilers, that are used widely (e.g not a tcc or turbo c)