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 17:27
Elliott Partridge is currently offline Elliott PartridgeFriend
Messages: 2
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"
#include "generated/struct/initializer/code2.c"

where code*.c resembles (just assume this matches the struct members):
// 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 17: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: Wed Apr 25 01:24:47 GMT 2018

Powered by FUDForum. Page generated in 0.01760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software