[sane-devel] C undefined operations in sane-backends-1.0.7-beta1
Tim Waugh
twaugh at redhat.com
Fri Jan 25 11:38:07 GMT 2002
On Fri, Jan 25, 2002 at 12:27:03PM +0100, Jaeger, Gerhard wrote:
> Hi there,
>
> let's have a look at the warnings from the Plustek backend.
> The lines that produce the problem include the following statement:
>
> _SWAP(x,y) (x)^=(y)^=(x)^=(y)
>
> So what? Where's the problem here?
I think the problem is that there are two assignments to x with no
intervening sequence point. Although the expression (x)^=(y) is
_evaluated_ first, it doesn't mean that the resulting value is then
assigned to x before the result of the expression (y)^=(x)^=(y) is;
the compiler is free to do it the other way around.
Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20020125/d8ae4326/attachment.sig>
More information about the sane-devel
mailing list