ID Number: Q43964
5.10 | 5.10
MS-DOS | OS/2
buglist5.10
Summary:
The Microsoft C Optimizing Compiler Version 5.10 produces the
following error when the function memset() is called with an improper
first argument, a required include statement is missing, and the
module is compiled with /Oi (which enables the generation of intrinsic
routines):
test.c(15) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)grammar.c:1.29', line 108)
Contact Microsoft Technical Support
If the proper header file is included but the parameter is still
incorrect, the following error message is displayed:
error c2172: 'memset' actual is not a pointer: parameter 1
More Information:
The function memset() expects to receive a pointer as the first
parameter. The following example demonstrates both levels of the
problem, i.e., the incorrect initial parameter and the missing header
file. The solution is to send an address as the the first parameter,
e.g. &Sample.
/* #include <memory.h> */ /* To show cause of problem, */
/* #include <string.h> */ /* uncomment either of these lines */
struct TEST {
char stuff[8];
} Sample;
void main(void)
{
memset (Sample,' ',8); /* To correct, replace Sample w/ &Sample */
}