Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
307 views
in Technique[技术] by (71.8m points)

c - Compiler support of GNU Statement Expression

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:

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...