[Nickle]Sequencing of expressions with side effects
Keith Packard
nickle@nickle.org
Tue, 23 Jul 2002 09:32:59 -0700
Around 9 o'clock on Jul 23, Keith Packard wrote:
> It looks like nickle will need to stack the lvalues until reaching the
> rvalue and then unwind the stack with multiple stores. In the case
> of += style operators, the evaluation of the lvalue will be followed by
> fetching the referenced value before the evaluation of the right hand side.
>
> I think this is easy.
Indeed it was quite easy. The patch is entangled with the new 'bool'
type; is there any complaint about breaking applications with this new
type? I've found it has caught a few errors in some of my code:
if (a & b == 0)
A classic precidence error -- the equality operator is of higher
precidence than the bitwise and operator, making this equivalent to:
if (a & (b == 0))
The addition of a true 'bool' type not commensurate with 'int' catches
this nicely.
The only remaining question is what to name our new utf8 functions.
Keith Packard XFree86 Core Team HP Cambridge Research Lab