Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse sees source code error
Eclipse sees source code error [message #1058069] Fri, 10 May 2013 18:59 Go to next message
Jim Bentley is currently offline Jim Bentley
Messages: 1
Registered: May 2013
Junior Member
I recently started on a project with a huge amount of existing code. They use #defines to flag whether certain areas are to be put into SRAM or DRAM.

----------
ex:

#define SECTION_SRAM

(...)


void MyFunction(int x) SECTION_SRAM;

----------

Eclipse flags this as a syntax error, saying that I'm missing a ; after the function declaration - it doesn't recognize that SECTION_SRAM is defined as nothing, and so shouldn't affect the line.

The ARM compiler does recognize this and knows how to handle it. I can't change this method - is there a way to get Eclipse to work with this?
Re: Eclipse sees source code error [message #1058099 is a reply to message #1058069] Sat, 11 May 2013 07:57 Go to previous message
Nobody Mising name is currently offline Nobody Mising name
Messages: 75
Registered: July 2010
Member
Jim Bentley wrote on Fri, 10 May 2013 14:59
Eclipse flags this as a syntax error, saying that I'm missing a ; after the function declaration - it doesn't recognize that SECTION_SRAM is defined as nothing, and so shouldn't affect the line.

Works for me:
http://i42.tinypic.com/ab6kif.png
Previous Topic:Retrieving Problem Messages from C Compiler
Next Topic:newcomer problems in getting started
Goto Forum:
  


Current Time: Wed Sep 17 21:40:35 GMT 2014

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

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