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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -