开发者

Linkage of formal parameters

I have a function say foo defined as

voi开发者_如何转开发d foo (int foo_arg)
{
  printf("%d",foo_arg);
}

What is the linkage type of foo_arg?


In C there are three kinds of linkage: external, internal, and none.

Formal parameters have no linkage

Section 6.2.2/6 (ISO C99)

The following identifiers have no linkage:

  • an identifier declared to be anything other than an object or a function;
  • an identifier declared to be a function parameter;
  • a block scope identifier for an object declared without the storage-class specifier extern.

Also read this thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜