5.1.2.3 Empty Function Parameter List

When building projects that conform to the C90 standard, the compiler assumes that functions declared with an empty parameter list have no parameters.

According to the C standard, functions defined with an empty parameter list, as in the following example:

int range()
{ ... }

are assumed to take no arguments, as if void was specified in the brackets. A similar prototype in a declaration, as in the following example:

extern int range();

should specify that no function parameter information has been provided. In this instance, MPLAB XC8 C Compiler instead assumes that the function has no parameters.

This limitation is not present when you are compiling against the C99 standard, where such a declaration would be correctly interpreted to mean that no information is specified regarding the function’s parameters.