Looked for a bit, but couldn't find anything that resembles this issue. I'm working on an STM32 C project using CodeSourcery/OpenOCD/GDB with an Eclipse makefile project. The project builds fine without any errors from CodeSourcery's gcc, but the Indexer is flagging a part of the code as a "syntax error". Here is the code in question:
static const MyStruct MyStructInst =
#if SWITCH == 1
#include "generated/struct/initializer/code1.c"
#else
#include "generated/struct/initializer/code2.c"
#endif
;
where code*.c resembles (just assume this matches the struct members):
{{0,1},
{0,
1,
2,
3,
// etc...
}}
I know that the struct declaration is within this scope, since I declare an uninitialized variable of the same type right before it. I'm thinking the Indexer is choking on the included source file, but I don't really understand why. Any ideas?
[Updated on: Fri, 05 October 2012 13:28] by Moderator