The information in this article applies to:
SYMPTOMSAttempting to delete a pointer to a constant causes the compiler to generate the following correct error message:
CAUSEDeleting a pointer to a constant should not be allowed by definition (ARM section 5.3.4) because it modifies the object pointed to. However, if you deliberately or accidentally use the explicit conversion, the compiler doesn't generate the error. The consequences of a such attempt are unpredictable and compiler implementation dependent. STATUSThis behavior is by design. MORE INFORMATIONSample Code #1 to Demonstrate Behavior
Visual C++ version 5.0 and 6.0 generate the following error:
Sample Code #2 to Demonstrate Behavior
REFERENCESFor more information, see The Annotated C++ Reference Manual (1994) section 5.3.4. Additional query words: 8.00 8.0 8.0c 8.00c 9.00 9.0 9.1 9.10
Keywords : kbcode kbCompiler kbCPPonly kbVC100 kbVC150 kbVC151 kbVC152 kbVC200 kbVC210 kbVC400 kbVC500 kbVC600 |
Last Reviewed: July 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |