Keil Logo


Information in this article applies to:

  • C166 All Versions
  • C251 All Versions
  • C51 All Versions


I have a program that has several variable names that are longer than 32 characters. When I compile my program, everything works fine. However, I have problems when I link. The first 34 characters in my variable names are identical. The linker resolves all references to these variables to the same address.

Does Keil plan to support variables names that are longer than 32 characters?


As you have discovered, the Keil C Compilers do not support external linkage of variables with longer than 32-character names. All variable names are truncated at 32 characters.

The ANSI specification calls for 31 characters for internal linkage and 6 characters for external linkage. The Keil C Compilers support 32 characters for internal and external linkage. All additional characters are ignored.


To resolve this problem, you'll have to rename your variables so that the name is shorter than 32 characters. Of course, the real problem is that the variable names are identical for the first 32 characters (which are the only ones that are significant to the compiler and linker).

Last Reviewed: Monday, April 23, 2001

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.