Keil Logo

D. Compiler Limits

The Cx51 Compiler embodies some known limitations that are listed below. For the most part, there are no limits with respect to components of the C language; for example, you may specify an unlimited number of symbols or number of case statements in a switch block. If there is enough address space, several thousand symbols could be defined.

  • A maximum of 19 levels of indirection (access modifiers) to any standard data type are supported. This includes array descriptors, indirection operators, and function descriptors.
  • Preprocessor symbols may be up to 255 characters long. All 255 characters are significant. Preprocessor symbols are case sensitive.
  • Names may be up to 255 characters long. The C language provides for case sensitivity in regard to function and variable names. However, for compatibility reasons, all names in the object file appear in capital letters. It is therefore irrelevant if an external object name within the source program is written in capital or small letters.
  • The maximum number of case statements in a switch block is not fixed. Limits are imposed only by the available memory size and the maximum size of individual functions.
  • The maximum number of nested function calls in an invocation parameter list is 10.
  • The maximum number of nested include files is 9. This value is independent of list files, preprocessor files, or whether or not an object file is to be generated.
  • The maximum depth of directives for conditional compilation is 20. This is a preprocessor limitation.
  • Instruction blocks ({...}) may be nested up to 15 levels deep.
  • Macros may be nested up to 8 levels deep.
  • A maximum of 32 parameters may be passed in a macro or function call.
  • The maximum length of a line or a macro definition is 65,535 characters. Even after a macro expansion, the result may not exceed 65,535 characters.
  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.