SUMMARY
There are a number of C Run-time routines that have both a function version
and an intrinsic version. If the following statement is used in an
application to force use of the function version:
#pragma function( a_CFunction )
where a_CFunction is a C Run-time library routine, the compiler generates
the following error:
error C2164: 'a_CFunction': intrinsic was not declared.
if the /Oi option is not used. The same is true for the following statement
to force use of the intrinsic:
#pragma intrinsic( a_CFunction )
When you don't use the /Oi or /Ox option, you need to declare a function
prototype before you can use the function or intrinsic pragmas. For
example, to properly use the memcpy function in the Sample Code below,
either STRING.H or MEMORY.H must be included. Consult the C Run-time
documentation for the appropriate header (.H) file to include.
For more information about #pragma intrinsic or C Run-time functions that
have intrinsic versions, consult the documentation provided with your
Microsoft compiler or development environment.
Sample Code
/* Compile options needed: none
*/
#pragma function( memcpy )
char s1[] = "string";
char s2[10];
void main( )
{
memcpy( s2, s1, 7 );
}