Indirection operator *

The * (indirection) operator determines the value referred to by the pointer-type operand. The operand can be a pointer to an incomplete type that is not cv void. The lvalue thus obtained cannot be converted to a C++11prvalueC++11 rvalue. If the operand points to an object, the operation yields an lvalue referring to that object. If the operand points to a function, the result is C onlya function designatorC only C++ onlyan lvalue referring to the object to which the operand pointsC++ only. Arrays and functions are converted to pointers.

The type of the operand determines the type of the result. For example, if the operand is a pointer to an int, the result has type int.

Do not apply the indirection operator to any pointer that contains an address that is not valid, such as NULL. The result is not defined.

If p_to_y is defined as a pointer to an int and y as an int, the expressions:
p_to_y = &y;
*p_to_y = 3;
cause the variable y to receive the value 3.
IBM extension starts

The indirection operator * has been extended to handle pointer to vector types, provided that vector support is enabled. A vector pointer should point to a memory location that has 16-byte alignment. However, the compiler does not enforce this constraint. Dereferencing a vector pointer maintains the vector type and its 16-byte alignment. If a program dereferences a vector pointer that does not contain a 16-byte aligned address, the behavior is undefined.

IBM extension ends