Keil Logo

C51: INTPROMOTE/NOINTPROMOTE Directive


Information in this article applies to:

  • C51 Version All Versions

QUESTION

What does the INTPROMOTE directive do?

ANSWER

The INTPROMOTE directive enables ANSI integer promotion rules. Expressions used in if statements are promoted from smaller types to integer expressions before comparison. This allows Microsoft C and Borland C programs to be ported to C51 with fewer modifications.

The NOINTPROMOTE directive disables automatic integer promotions. Integer promotions are normally enabled to provide the greatest compatibility between C51 and other ANSI compilers.

If your program relies on standard ANSI integer promotions you should not use the NOINTPROMOTE directive.

MORE INFORMATION

SEE ALSO


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
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.