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:
Error C267: 'func_foo': requires ANSI-style prototype
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.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Friday, March 23, 2018
of your data.