C/C++の宿題片付けます 135代目

このエントリーをはてなブックマークに追加
10194
>>95
仕様書の該当場所をみつけた。
残念ながら TC2 (草案とみなしていいのかな?)なんだけれども

ISO/IEC 9899TC2
6.7.5.3 Function declarators (including prototypes)
14
An identifier list declares only the identifiers of the parameters of the function. An empty
list in a function declarator that is part of a definition of that function specifies that the
function has no parameters.

とあり、関数の定義のときには、空のリストは no parameters だそうだ。

The empty list in a function declarator that is not part of a
definition of that function specifies that no information about the number or types of the
parameters is supplied.

関数定義の一部ではない場所での空リストはパラメータの内容について情報を示さないそうだ。
同文書では例として、

16
EXAMPLE 1 The declaration
int f(void), *fip(), (*pfi)();
declares a function f with no parameters returning an int, a function fip with no parameter specification
returning a pointer to an int, and a pointer pfi to a function with no parameter specification returning an
int.

があり、この例では関数定義での *fpi() は "no parameter" だそうだ。
ここで教えてもらった。つ http://pc12.2ch.net/test/read.cgi/tech/1246115922/