C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
loop_opt
                                             Up Contents Index Back
─────C/C++ Language─────────────────────────────────────────────────────────
 
  Pragma:   loop_opt
 
  Syntax:   #pragma loop_opt( [{off | on}] )
 
  Summary:  Controls loop optimization for selected functions.
 
     You can use the loop_opt pragma to turn loop optimization on or
     off for selected functions. When you want to turn off loop
     optimization, put the following line before the code on which you
     do not want to perform loop optimization:
 
          #pragma loop_opt( off )
 
     Note that the preceding line disables loop optimization for all
     code that follows it in the source file, not just the routines on
     the same line. To reinstate loop optimization, insert the
     following line:
 
          #pragma loop_opt( on )
 
     If no argument is given to the loop_opt pragma, loop optimization
     reverts to the behavior specified as a compiler option: enabled if
     the /Ox or /Ol option is in effect, and disabled otherwise. The
     interaction of the loop_opt pragma with the /Ol and /Ox options is
     explained in greater detail below:
 
                               Compiled with
     Syntax                    /Ox or /Ol?     Action
 
     #pragma loop_opt()        No              Turns off optimization
                                               for loops that follow
 
     #pragma loop_opt()        Yes             Turns on optimization
                                               for loops that follow
 
     #pragma loop_opt( on )    Yes or no       Turns on optimization
                                               for loops that follow
 
     #pragma loop_opt( off )   Yes or no       Turns off optimization
                                               for loops that follow
                                    -♦-