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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -