[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
ARM_conform

Description:
Controls the use of non-ARM language features.
Compatibility:
This pragma is compatible with the following platform targets:
Prototype:
#pragma ARM_conform on | off | reset
Remarks:
When pragma ARM_conform is on, the compiler generates an error when it encounters certain ANSI C++ features that conflict with the C++ specification in The Annotated C++ Reference Manual. Use this option only if you must make sure that your code strictly follows the specification in The Annotated C++ Reference Manual.
Turning on this pragma prevents you from doing the following
class X {};
class Y : protected X {}; // OK if ARM_conform is off.
Changing the syntax of the conditional operator to let you use assignment expressions without parentheses in the second and third expressions. For example:
i ? x=y : y=z // OK if ARM_conform is off.
i ? (x=y):(y=z) // ALWAYS OK
Declaring variables in the conditions of if, while and switch statements. For example:
while (int i=x+y) { . . . } // OK if ARM_conform is off.
Turning on this option allows you to do the following:
Using variables declared in the condition of an if statement after the if statement. For example:
for(int i=1; i<1000; i++) { /* . . . */ }
return i; // OK if ARM_conform is on.
This pragma corresponds to the ARM Conformance option in the C/C++ Language Panel. To check whether this option is on, use __option (ARM_conform), described in "Checking Options."
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 17, 2000