When using TI (Texas Instrument) compiler, I am able to set a memory location of embedded micro-controller using C++ by simply ADC12IFG = 50;
. Clang marks this code as error: indirection requires pointer operand ('int' invalid)
. So when I dig into it, TI has a header file, msp430f5335.h which has the following lines:
#define SFR_16BIT(address) extern volatile unsigned int address
SFR_16BIT(ADC12IFG); /* ADC12+ Interrupt Flag */
Then there is a linker command file, msp430f5335.cmd which has the following line:
ADC12IFG = 0x070A;
So it looks like the linker command file specifies the address
. So is it possible to have clang analysis tool recognize the linker command file and not cause a false positive?