Syntax Error for every __weak and __packed
I reported this almost a year back. CDT’s code indexer is still confused about the quotes in the symbols.
Eclipse shows a syntax error every time the __weak or __packed macros are used in ST’s code. The indexer will not properly index the code due to the syntax errors. Searching for references and declarations and whatnot are not properly found, since CDT cannot parse the code due to the the syntax errors.
Rightclick a project and take a look at the compiler settings. In the list of symbols you find this:
__weak="__attribute__((weak))"
So any declaration like
__weak void myFunction();
becomes
"__attribute__((weak))" void myFunction();
That’s a syntax error. Those quotes don’t belong there and should NOT be part of the symbol definition. This needs to be fixed. CDT cannot work properly with those quotes present.
Please fix it, or point me at the code that is involved in generating those quotes. I will fix it and send you a patch.
To make matters worse, SW4STM32 is re-adding those definitions of the quotes are removed. However, these quotes are effectively sabotaging CDT’s Indexer!