ARM Technical Support Knowledge Articles

INTPROMOTE/NOINTPROMOTE DIRECTIVE

Applies to: C51 C Compiler

Answer


Information in this article applies to:


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

Article last edited on: 2005-11-10 17:24:55

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential