6.5.3.2 Address and indirection operators

Previous Table of Contents "New C Standard" commentary

1088 The operand of the unary & operator shall be either a function designator, the result of a [] or unary * operator, or an lvalue that designates an object that is not a bit-field and is not declared with the register storage-class specifier.

1089 The operand of the unary * operator shall have pointer type.

1090 The unary & operator yields the address of its operand.

1091 If the operand has type “type”, the result has type “pointer to type”.

1092 If the operand is the result of a unary * operator, neither that operator nor the & operator is evaluated and the result is as if both were omitted, except that the constraints on the operators still apply and the result is not an lvalue.

1093 Similarly, if the operand is the result of a [] operator, neither the & operator nor the unary * that is implied by the [] is evaluated and the result is as if the & operator were removed and the [] operator were changed to a + operator.

1094 Otherwise, the result is a pointer to the object or function designated by its operand.

1095 The unary * operator denotes indirection.

1096 If the operand points to a function, the result is a function designator;

1097 if it points to an object, the result is an lvalue designating the object.

1098 If the operand has type “pointer to type”, the result has type “type”.

1099 If an invalid value has been assigned to the pointer, the behavior of the unary * operator is undefined.84)

1100 Forward references: storage-class specifiers (6.7.1), structure and union specifiers (6.7.2.1).

Next

Created at: 2008-01-30 02:39:42 The text from WG14/N1256 is copyright © ISO