本文介绍了是"在防爆pressions&QUOT声明和宣言;具体到GNU C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
防爆声明和宣言pressions 具体到GNU C?或者,这个功能也包含在C99标准?
Are Statement and Declarations in Expressions specific to GNU C ? Or this feature is also included in C99 standard ?
推荐答案
这是一个GCC扩展。 (见GCC文档,,对于GCC扩展的完整列表;以及。)
It's a GCC extension. (See the GCC docs, e.g. here for gcc 4.3.3, for a full list of GCC extensions; and the C99 spec is available here.)
GCC将警告这样的事情,如果你使用 -pedantic -std = C99
标记,例如:
GCC will warn about such things if you use the -pedantic -std=c99
flags, e.g.:
$ cat foo.c
int main(void)
{
return ({ int a = 0; a; });
}
$ gcc -pedantic -std=c99 -c foo.c
foo.c: In function 'main':
foo.c:3: warning: ISO C forbids braced-groups within expressions
这篇关于是"在防爆pressions&QUOT声明和宣言;具体到GNU C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!