In general, function-like macros must behave exactly like regular functions. This means that all parameters to the macro must be evaluated as if they were normal function parameters even though they may be given as complex expressions from the caller.
The preceding example has two problems:
(&foo_bitmap[a | b >> 5] |= 1 << (a | b & 31). Both the >> and & operators have higher precedence than the | operator, so the macro will not behave in the same way as a function.For an example of a correct implementation, please see the set_bit() macro as it appears in the framework.
1.6.3