The standard (latest version: WG14 / N1256) states (6.2.1 Β§2):
A function prototype is a declaration of a function declaring the types of its parameters.
In the immediate vicinity of this statement, we also find evidence that the declaration of an identifier consists of a declarator or type specifier (Β§4):
Each other identifier has a scope determined by the placement of its declaration (in the declarator or type specifier).
Thus, it would seem that knowing whether a function definition is a prototype of a function reduces to understanding whether a function definition is a declarator. It?
I need a verified answer that conforms to the C standard. I donβt care about the usual meaning, or what Wikipedia says or your favorite book C.
Here is the statement in the standard that led me to the idea that function definitions can indeed be function prototypes (Β§4):
If a declarator or type specifier declaring an identifier appears in the list of parameter declarations in the function prototype (is not part of the function definition), ...
source
share