[sane-devel] C undefined operations in sane-backends-1.0.7-beta1

Tim Waugh twaugh@redhat.com
Fri, 25 Jan 2002 11:38:07 +0000


--lBe/Si07TENnq+bY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jan 25, 2002 at 12:27:03PM +0100, Jaeger, Gerhard wrote:

> Hi there,=20
>=20
> let's have a look at the warnings from the Plustek backend.
> The lines that produce the problem include the following statement:
>=20
> _SWAP(x,y)	(x)^=3D(y)^=3D(x)^=3D(y)
>=20
> 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)^=3D(y) is
_evaluated_ first, it doesn't mean that the resulting value is then
assigned to x before the result of the expression (y)^=3D(x)^=3D(y) is;
the compiler is free to do it the other way around.

Tim.
*/

--lBe/Si07TENnq+bY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8UUOeyaXy9qA00+cRAru7AJ9odTewG5E6uSArWyUQwHxl5m7KSwCeN25M
IUdaBZk4qW0I/MTNe7zUkiw=
=WpiC
-----END PGP SIGNATURE-----

--lBe/Si07TENnq+bY--