Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: amd64/-current doesn't compile with clang
On Fri, Nov 29, 2013 at 10:13:46AM +0100, Thomas Klausner wrote:
> --- toom44_mul.o ---
> /archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/toom44_mul.c:209:52:
> error: '&' within '|' [-Werror,-Wbitwise-op-parentheses]
> flags = (enum toom7_flags) (flags | toom7_w3_neg & mpn_toom_eval_dgr3_pm1
> (apx, amx, ap, n, s, tp));
> ~
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/toom44_mul.c:209:52:
> note: place parentheses around the '&' expression to silence this warning
> flags = (enum toom7_flags) (flags | toom7_w3_neg & mpn_toom_eval_dgr3_pm1
> (apx, amx, ap, n, s, tp));
> ^
> (
> )
>
I fixed this by adding parentheses around the & part (after testing
that this binds stronger in gcc) and tried again, and had similar
failures in the next files:
--- toom53_mul.o ---
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/toom53_mul.c:102:52:
error: '&' within '|' [-Werror,-Wbitwise-op-parentheses]
flags = (enum toom7_flags) (flags | toom7_w1_neg & mpn_toom_eval_pm2 (as2,
asm2, 4, ap, n, s, gp));
~
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/toom53_mul.c:102:52:
note: place parentheses around the '&' expression to silence this warning
flags = (enum toom7_flags) (flags | toom7_w1_neg & mpn_toom_eval_pm2 (as2,
asm2, 4, ap, n, s, gp));
^
--- div_qr_2.o ---
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:254:7:
error: & has lower precedence than >=; >= will be evaluated first
[-Werror,-Wparentheses]
udiv_qr_4by2 (q1, q0, r1, r0, r1, r0, n1, n0, d1, d0, di1, di0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:146:37:
note: expanded from macro 'udiv_qr_4by2'
_mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >=
(q1,q0) */ \
~~~~~~~~~~^
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:254:7:
note: place parentheses around the '>=' expression to silence this warning
udiv_qr_4by2 (q1, q0, r1, r0, r1, r0, n1, n0, d1, d0, di1, di0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:146:37:
note: expanded from macro 'udiv_qr_4by2'
_mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >=
(q1,q0) */ \
~~~~~~~~~ ^
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:254:7:
note: place parentheses around the & expression to evaluate it first
udiv_qr_4by2 (q1, q0, r1, r0, r1, r0, n1, n0, d1, d0, di1, di0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/archive/foreign/src/external/lgpl3/gmp/lib/libgmp/../../dist/mpn/generic/div_qr_2.c:146:37:
note: expanded from macro 'udiv_qr_4by2'
_mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >=
(q1,q0) */ \
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Should I keep adding parentheses, or should we disable
-Werror,-Wbitwise-op-parentheses and/or -Werror,-Wparentheses?
Thomas
Home |
Main Index |
Thread Index |
Old Index