When the ARM Conformance option in the C/C++ Language Panel is on, CodeWarrior C++ generates an error when it encounters certain ANSI/ISO 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 option prevents you from doing the following
class X {};
class Y : protected X {}; // OK in CodeWarrior C++. Error in ARM.i ? x=y : y=z // OK in CodeWarrior C++. Error in ARM. i ? (x=y):(y=z) // OK in ARM and CodeWarrior C++
if, while and switch statements (K&R, §A9.4, §A9.5). For example:
while (int i=x+y) { /* ... */ }
// OK in CodeWarrior C++. Error in ARM.Turning on this option allows you to do the following:
for statement after the for statement (K&R, §9.5). For example:
for(int i=1; i<1000; i++) { /* ... */ }
return i; // OK in ARM, Error in CodeWarrior C++
This option corresponds to the pragma ARM_conform. To check whether this option is on, use __option (ARM_conform). By default, this option is off.
See also "ARM_conform" and "Checking Options."