Unary Expressions

Grammar§

PreExpression ::= AtExpression | DerefExpression | NegExpression | NotExpression | OneCompExpression | PreDecExpression | PreIncExpression | PostExpression ;

AtExpression§

Grammar§

AtExpression ::= "&" PreExpression

Semantics§

The expression takes the address of its nested expression. The nested expression must be an Lvalue so from the point of view of the x86 backend it is almost always a noop. The exception is when the nested expression resolve to a value parameter.

DerefExpression§

Grammar§

DerefExpression ::= "*" PreExpression

Semantics§

The expression dereferences its nested expression. The type of the nested expression must be a pointer.

NegExpression§

Grammar§

NegExpression ::= "-" PreExpression

Semantics§

The expression negate its unary. The type of the nested expression must be numeric.

NotExpression§

Grammar§

NotExpression ::= "!" PreExpression

Semantics§

The expression performs logical negation of its unary. The type of the nested expression must be bool or interpretable as a condition. The expression has the type bool.

OneCompExpression§

Grammar§

OneCompExpression ::= "~" PreExpression

Semantics§

PreDecExpression§

Grammar§

PreDecExpression ::= "--" PreExpression

Semantics§

PreIncExpression§

Grammar§

PreIncExpression ::= "++" PreExpression

Semantics§