You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ac_std_float has some compiler warnings with clang-9.
For example, with -Wbitwise-conditional-parentheses and -Wunused-variable:
./ac_types/include/ac_std_float.h:429:23: error: unused variable 'rnd' [-Werror,-Wunused-variable]
static const bool rnd = QFX!=AC_TRN && QFX!=AC_TRN_ZERO;
...
./ac_types/include/ac_std_float.h:790:51: error: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses]
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
./ac_types/include/ac_std_float.h:790:51: note: place parentheses around the '|' expression to silence this warning
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
^
( )
./ac_types/include/ac_std_float.h:790:51: note: place parentheses around the '?:' expression to evaluate it first
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
It would be really nice if this new header could be warnings-clean under clang, as disabling warnings transitively affects every translation unit that includes the header, and we've found these warnings to be particularly effective at keeping code bug-free.
The text was updated successfully, but these errors were encountered:
ac_std_float has some compiler warnings with clang-9.
For example, with -Wbitwise-conditional-parentheses and -Wunused-variable:
./ac_types/include/ac_std_float.h:429:23: error: unused variable 'rnd' [-Werror,-Wunused-variable]
static const bool rnd = QFX!=AC_TRN && QFX!=AC_TRN_ZERO;
...
./ac_types/include/ac_std_float.h:790:51: error: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Werror,-Wbitwise-conditional-parentheses]
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
./ac_types/include/ac_std_float.h:790:51: note: place parentheses around the '|' expression to silence this warning
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
^
( )
./ac_types/include/ac_std_float.h:790:51: note: place parentheses around the '?:' expression to evaluate it first
int exp = ( (e1_lt_e2 & !op2_zero) | op1_zero ? op2_e_b : op1_e_b);
It would be really nice if this new header could be warnings-clean under clang, as disabling warnings transitively affects every translation unit that includes the header, and we've found these warnings to be particularly effective at keeping code bug-free.
The text was updated successfully, but these errors were encountered: