C51: Error C267 ('function': Requires Ansi-style Prototype)
Information in this article applies to:
I've received the following error message while compiling my program:
What does this message mean?
If this error message appears by itself, it indicates that the function prototype for func_foo() has an empty parameter list, but the function definition of func_foo() includes parameters. Function prototypes must match function definitions.
Sometime this error also appears if the compiler cannot find the header file for a project. If so, resolve the other errors in the output window, to resolve this one.
Find the prototype and either remove it or update it so that its arguments match that of the definition. Function prototypes must proceed function references in the source file, otherwise the compiler may interpret a function call as a function prototype.
If the error is for a function pointer, or for C code to Assembly code, pay attention to the compiler syntax rules in the manual.
Last Reviewed: Thursday, February 25, 2021
of your data.