编译器支持GNU语句表达式 [英] Compiler support of GNU Statement Expression
本文介绍了编译器支持GNU语句表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
哪些现代编译器支持Gnu语句表达式(C和C ++语言)。我应该使用什么版本的语句表达式?
Which modern compilers support the Gnu Statement expression (C and C++ languages). What versions should I have to use a statement expressions?
语句表达式是smth像({code; code; retval})
:
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> = ?
- Intel C ++ Compiler> = 6.0(Linux版本,检查网页4 ;位有限)
- Sun Studio> = 12(新的语言扩展)
- IBM XL for z / OS(标记为IBM扩展)
- Open64(因为它使用 osprey-gcc 前端)
- GCC >=3
- Clang/LLVM >= ?
- 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。一些C / C ++编译器在这里列出,但我只感兴趣成熟的编译器,广泛使用(例如,不是一个tcc或turbo 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)
推荐答案
它支持gnu99与 - std = gnu99
这篇关于编译器支持GNU语句表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文