[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rcparse.y: unary negation of unsigned type
From: |
Nick Clifton |
Subject: |
Re: rcparse.y: unary negation of unsigned type |
Date: |
08 Feb 2003 09:45:35 +0000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 |
Hi Perry,
> $$.val = - $2.val;
>
> Isn't that .val making it an unsigned type, in which case the
> unary minus does... what ?
Actually it works. C promotes val to (signed long), negates it, and
then promotes the result back to (unsigned long).
Cheers
Nick