RAD Studio
ContentsIndex
PreviousUpNext
W8072: Suspicious pointer arithmetic (C++)

This message indicates an unintended side effect to the pointer arithmetic (or array indexing) found in an expression. 

 

#pragma warn +spa
intarray[10];
intfoo(__int64 index)
{
returnarray[index];
}

The value of index is 64 bits wide while the address of array is only 32 bits wide.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!