No. It is "cast a char * to int * _and_dereference_it_". He never
told about dereferencing. Freely casting between different pointers
types works perfectly on most if not all modern[1] architectures, was
heavily used before the time of void * (look at the pre-ISO malloc()
prototype), and is still in heady use in C code that tries to mimic OO
abstraction in particular.
OG.
[1] Emphasis on modern. Tagged pointers are gone.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/