* examples/adder/adder.cxx (test_vector): Add parentheses to

remove a clang++-2.9 warning.
This commit is contained in:
Alexandre Duret-Lutz 2011-08-28 10:13:36 +02:00
parent 24be6076f6
commit 92ef9d6e07
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-08-28 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* examples/adder/adder.cxx (test_vector): Add parentheses to
remove a clang++-2.9 warning.
2011-08-27 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2011-08-27 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* src/bddop.c (bdd_support): Speedup using a cache. * src/bddop.c (bdd_support): Speedup using a cache.

View file

@ -35,7 +35,7 @@ void build_adder(void)
xout[n] = ainp[n] ^ binp[n] ^ co[n-1]; xout[n] = ainp[n] ^ binp[n] ^ co[n-1];
co[n] = ainp[n] & binp[n] | co[n] = ainp[n] & binp[n] |
ainp[n] & co[n-1] | ainp[n] & co[n-1] |
binp[n] & co[n-1]; binp[n] & co[n-1];
} }
else else
{ {
@ -181,7 +181,8 @@ int test_vector(bdd av, bdd bv, int a, int b)
{ {
bdd resv = av & bv & xout[n]; bdd resv = av & bv & xout[n];
if (resv == bddfalse && (res & 1) || resv != bddfalse && !(res & 1)) if ((resv == bddfalse && (res & 1))
|| (resv != bddfalse && !(res & 1)))
return 0; return 0;
res = res >> 1; res = res >> 1;