Keil Logo

C51: Error C267 ('function': Requires Ansi-style Prototype)

Information in this article applies to:

  • C51 Version 5 and Later


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.

If the issue is difficult to resolve, PC-LINT can provide more details, see an example here.



Last Reviewed: Thursday, February 25, 2021

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.