The information in this article applies to:
SUMMARYThe Sample Code below shows an inconsistency with the way that the Microsoft compilers listed above deal with pointer checking. The ANSI standard is unclear about whether an assignment to a void pointer should be checked to see if it is being assigned a nonpointer variable. The code below shows that character pointers are checked while void pointers are not; the code will generate the following warnings: 16-bit compilersThe compiler generates the following warning for the void pointer in the sample code as well as the character pointer:
32-bit compilersThe compiler generates the following warming with the sample code:
7.0 and laterCompiler versions 7.0 and later generate the following error in both cases if the program is compiled as a C++ program (.cpp extension).
MORE INFORMATIONSample Code:
Additional query words: kbinf 6.00 6.00a 6.00ax 7.00 8.00 8.00c 9.00 9.10 1.00 1.50 2.00 2.10
Keywords : |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |