|
|||||||||||
Technical Support Support Resources
Product Information |
C166: Pointer Truncation for Identically Declared PointersInformation in this article applies to:
QUESTIONI compile the following code with the C166:
This generates:
Why are not all three pointers huge? Why does pTest2 point to near memory? ANSWERThe memory type specifier huge in a pointer declaration list must be repeated for each pointer. In your code example, pTest1 points to huge, but pTest2 points to the default memory space (which is near for the memory model Tiny, Small, or Medium). You may avoid this by using a typedef:
Using the typedef, you can be sure that all declarations in the list have the same type. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.