Are compound statements (blocks) surrounded by parens expressions in ANSI C?

前端 未结 2 1044
臣服心动
臣服心动 2020-11-22 11:45

Browsing the Linux kernel sources I found some piece of code where a block of statements surrounded by parenthesis is treated as a expression a la lisp (or ML), tha

2条回答
  •  傲寒
    傲寒 (楼主)
    2020-11-22 12:20

    It's called "braced-group within expression".

    It's not allowed by ANSI/ISO C nor C++ but gcc supports it.

提交回复
热议问题