Bug in XC8 compiler??
I discovered that in this piece of code:
1) TRISB = 0x80; //b7 input
2) TRISBbits.TRISB7 = 1 //b7 input
3) INTCONbits.INTF = 0; //reset the external interrupt flag
4) INTCONbits.RBIF = 0; //reset the interrupt ON CHANGE flag
Line 1 and 2 both set the same bit but when you compile this code, the compiles no longer understands the notation in line 3 and 4 and the compile fails.
If you remove or comment out line 2, the program compiles successfully. This makes no sense but I have seen other places where the XC8 compiler does not recognize the notation "INTCONbits.RBIF"
Does anyone know why or how to avoid this odd behavior?