Find << priority is very low ... Or am I too ignorant ...
#include <stdio.h>
#define GET_BIT(a, b, c) a << b - c
int main()
{
int a = 1;
int b = 5;
int c = 4;
printf("%d\n", GET_BIT(a, b, c) + 1);
}
result: 4
C's Priority formula
Bracket members first; Bracket operator [] () member operator. ->
All monocular second; All monocular operators such as + +,--、 + (positive),-(negative), pointer operation *, &
Multiplication and division Yusan, plus minus four; This "Yu" means the remainder operation, i.e.%
Shift five, relationship six; Shift operators:<< >>, Relationship:> < >= <= etc.
Equal to (with) unequal row seventh; that is = = = and!=
Bit with XOR or bit or; These are bitwise operations: Bits and (&) or (^) bits or (|)
"Three points World" eighty or ninety;
The logic or the heel; Logical operators: | | and &&
12 and 11; Note Order: Priority (| |) at the bottom of priority (&&)
The condition is higher than assignment,//three mesh operator precedence to 13 bits is only higher than assignment operator and ","
The lowest comma operation level! The comma operator has the lowest precedence