W8072 Suspicious pointer arithmetic (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

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

Example:

#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.