In an unsafe context, an expression may yield a result of a pointer type, but outside an unsafe context it is a compile-time error for an expression to be of a pointer type. In precise terms, outside an unsafe context a compile-time error occurs if any simple-name (§7.6.2), member-access (§7.6.4), invocation-expression (§7.6.5), or element-access (§7.6.6) is of a pointer type.
In an unsafe context, the primary-no-array-creation-expression (§7.6) and unary-expression (§7.7) productions permit the following additional constructs:
primary-no-array-creation-expression:
...
pointer-member-access
pointer-element-access
sizeof-expression
unary-expression:
...
pointer-indirection-expression
addressof-expression
These constructs are described in the following sections. The precedence and associativity of the unsafe operators is implied by the grammar.
Do'stlaringiz bilan baham: |