Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - certain functions, those listed in the description of the "oi" option, have http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Certain functions, those listed in the description of the "oi" option, have
intrinsic forms.  These functions are special functions that are recognized
by the compiler and processed in a special way.  For example, the compiler
may choose to generate in-line code for the function.  The intrinsic
attribute for these special functions is set by specifying the "oi" option
or using an "intrinsic" pragma.  The "function" pragma can be used to remove
the intrinsic attribute for a specified list of functions.

The following describes the form of the "function" pragma.

+--------------------------------------------------------------------------+
|      #pragma function ( fn {, fn} ) [;]                                  |
|                                                                          |
+--------------------------------------------------------------------------+

where
    description

fn
    is the name of a function.

Suppose the following source code was compiled using the "oi" option so that
when one of the special functions is referenced, the intrinsic form will be
used.  In our example, we have referenced the function sin which does have
an intrinsic form.  By specifying sin in a "function" pragma, the intrinsic
attribute will be removed, causing the function sin to be treated as a
regular user-defined function.


     #include <math.h>
     #pragma function( sin );

     double test( double x )
     {
         return( sin( x ) );
     }

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson