False. The standard makes a very clear distinction between empty
brackets in a declaration not part of a definition, and empty brackets
that _are_ in part of a definition. And the latter is EXACTLY equivalent
to (void).
Where?
6.7.5.3p14 says "An empty
list in a function declarator that is part of a definition of that
function specifies that the
function has no parameters."
It does NOT say that it is or functions as a prototype.
6.9.1p7 says "If the declarator includes a parameter type list,"
meaning new=prototype form it "also serves as a
function prototype for later calls to the same function in the same
translation unit." It then proceeds to the other case "If the
declarator includes an identifier list," meaning old form which
includes empty parentheses, where it says no such thing.
_C++_ effectively has only prototype form and actually says the
reverse: 8.3.5[dcl.fct]p2 "The parameter list (void) is equivalent
to the empty parameter list." (for both declarations and definitions).
This is one of the several reasons people here keep saying like a
mantra that C++ is NOT a superset of C.
It is fairly easy for a compiler to produce a diagnostic in this case,
as good QoI. But it is not required by the C standard.
- David.Thompson1 at worldnet.att.net