c++ - Compiler warning: suggest parentheses around arithmetic in operand of '|' -
i have gone through other similar issues, , yet cannot understand why getting error :
warning: suggest parentheses around arithmetic in operand of '|' [-wparentheses] &((~((periphs_io_mux_func)<<(periphs_io_mux_func_s)))) \
i using xtensa-gcc. following code (from esp8266 sdk) :
#define pin_func_select(pin_name, func) { \ write_peri_reg(pin_name, \ (read_peri_reg(pin_name)) \ &((~((periphs_io_mux_func)<<(periphs_io_mux_func_s)))) \ |((((func&bit2)<<(2))|(func&0x3))<<(periphs_io_mux_func_s)) ); \ } while (0)
the "&" , "|" leading on last 2 lines both @ same level of parentheses. compiler warning there can confusion developers regarding precedence.
Comments
Post a Comment