Intel i960 User Manual page 232

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

7
Language Implementation
Similarly, the address of the compound expression can be taken. These
two expressions are equivalent:
&(a, b)
a, &b
A conditional expression is a valid lvalue if its type is not void and the true
and false branches are both valid lvalues. For example, these two
expressions are equivalent:
(a ? b : c) = 5
(a ? b = 5 : (c = 5))
A cast is a valid lvalue if its operand is valid. Taking the address of the
cast is the same as taking the address without a cast, except for the type of
the result. For example, these two expressions are equivalent (but the
second may be valid when the type of
does not permit a cast to
):
a
int *
&(int *)a
(int **)&a
A simple assignment whose left-hand side is a cast works by converting
the right-hand side first to the specified type, then to the type of the inner
left-hand side expression. After this is stored, the value is converted back
to the specified type to become the value of the assignment. Thus, if
has
a
type
, the following two expressions are equivalent:
char *
(int)a = 5
(int)(a = (char *)5)
An assignment-with-arithmetic operation such as
applied to a cast
+=
performs the arithmetic using the type resulting from the cast, and then
continues as in the previous case. Therefore, these two expressions are
equivalent:
(int)a += 5
(int)(a = (char *) ((int)a + 5))
7-43

Advertisement

Table of Contents
loading

Table of Contents