BUG: Optimization Bug When Using Array with memset Initializer (263606)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q263606 SYMPTOMS
The C/C++ compiler may generate incorrect code when compiled with the /O2 option if an array pointer is initialized with a call to the memset initializer.
RESOLUTION
Split the array initialization and pointer initialization into two steps as shown in the sample code below.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbBug kbCodeGen kbCompiler KB263606 |
---|
|