Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer syntax error false positive(The indexer flags a struct declaration/initializer as a syntax error)
Indexer syntax error false positive [message #934126] Fri, 05 October 2012 13:27
Elliott Partridge is currently offline Elliott Partridge
Messages: 1
Registered: October 2012
Junior Member
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]

Report message to a moderator

Previous Topic:Disable code analysis on a per file basis?
Next Topic:Build a 64-bit Executable with CDT and MS Win 7 SDK
Goto Forum:
  


Current Time: Mon Apr 21 05:45:41 EDT 2014

Powered by FUDForum. Page generated in 0.02415 seconds