Compiler Warning (level 4) C4213
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Warning (level 4) C4213.
nonstandard extension used : cast on l-value
With the default Microsoft extensions (/Ze), you can use casts on the left side of an assignment statement.
// C4213.c
// compile with: /W4
void *a;
void f()
{
int i[3];
a = &i;
*(( int * )a )++ = 3; // C4213
}
int main()
{
}
Such casts are invalid under ANSI compatibility (/Za).
Show: