结构在函数 name/parameters 之后但在方括号之前立即声明。有人可以解释这个 C 语法吗?

Struct declared immediately after function name/parameters but before brackets. Can someone explain this C syntax?

代码如下:

A_output(message) 
 struct msg message;
{

}

我以前从未见过这样的语法。该结构定义在做什么?这只是在参数字段中指定 "message" 的 "type" 的另一种方式吗?那么,它和这个是一回事吗?:

A_output(struct msg message) 
{

}

这个

A_output(message) 
 struct msg message;
{

}

是现在不允许使用的函数定义的旧语法,因为该函数未声明 [​​=24=] 类型。早期默认 ​​return 类型是 int.

至于这样的函数定义

void A_output(message) 
 struct msg message;
{

}

那么它是一个带有标识符列表的有效函数定义。

来自 C 标准(6.9.1 函数定义)

6 If the declarator includes an identifier list, each declaration in the declaration list shall have at least one declarator, those declarators shall declare only identifiers from the identifier list, and every identifier in the identifier list shall be declared. An identifier declared as a typedef name shall not be redeclared as a parameter. The declarations in the declaration list shall contain no storage-class specifier other than register and no initializations.