I was looking at some code used in an embedded environment and stumbled upon this snippet:
...MACRO_VALUE+(value)/4*4
where MACRO_VALUE
and value
come from:
#define MACRO_VALUE 0x...
#define MACRO_FUNCTION(value, priority) ...MACRO_VALUE+(value)/4*4...
Every time value
and priority
from MACRO_FUNCTION
are used they are surrounded by parentheses.value
and priority
are uint32_t
types. I tested a version with and without parentheses but the result stays the same. I searched on stackoverflow but couldn't find anything so far. As I see no casting, declaration, modification of evaluation order or associativity I don't understand the purpose of those parentheses. What is their purpose?