ARM_scoping

Controls the scope of variables declared in the expression parts of if , while , do , and for statements.

Syntax
#pragma ARM_scoping on | off | reset
  
Remarks

If you enable this pragma, any variables you define in the conditional expression of an if , while , do , or for statement remain in scope until the end of the block that contains the statement. Otherwise, the variables only remain in scope until the end of that statement. Example of Using Variables Declared in for Statement shows an example.

This pragma corresponds to the Legacy for-scoping setting in the CodeWarrior IDE's Properties > C/C++ Build > Settings > Tool Settings > PowerPC Compiler > C/C++ Language settings panel. By default, this pragma is off .

Listing 1. Example of Using Variables Declared in for Statement
for(int i=1; i<1000; i++) { /* . . . */ }
return i;  // OK if ARM_scoping is on, error if ARM_scoping is off.
Related information
access_errors
always_inline
arg_dep_lookup
ARM_conform
array_new_delete
auto_inline
bool
cplusplus
cpp1x
cpp_extensions
debuginline
def_inherited
defer_codegen
defer_defarg_parsing
direct_destruction
direct_to_som
dont_inline
ecplusplus
exceptions
inline_bottom_up
inline_bottom_up_once
inline_depth
inline_max_auto_size
inline_max_size
inline_max_total_size
internal
iso_templates
new_mangler
no_conststringconv
no_static_dtors
nosyminline
old_friend_lookup
old_pods
old_vtable
opt_classresults
parse_func_templ
parse_mfunc_templ
RTTI
suppress_init_code
template_depth
thread_safe_init
warn_hidevirtual
warn_no_explicit_virtual
warn_no_typename
warn_notinlined
warn_structclass
wchar_type