Using Typecasted Pointers as lvalues

The C compiler can accept pointers that are typecasted to other pointer types as lvalues.

Listing 1. Example of a Typecasted Pointer as an lvalue

char *cp;
((long *) cp)++; /* OK if ANSI Strict is disabled. */

See also “Checking for Standard C and Standard C++ Conformity”.