Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Syntax error warning CDT 5.0 (Ganymede)

a) Does your file include the header defining the PL_OS9 or L_LINUX?
b) If not, you might do:
- Add the current define in the projects settings under Paths&Symbols page - Change the indexer settings (either system wide or project specific) and set the 'Index all headers (files neither built nor included also)'

Ilija Kocho schrieb:
Dear colleagues

I switched from Callisto (CDT 4.0) to Ganymede (CDT 5.0) and i have
problems with some of its features. Here is one of them.

Note: My project that comprises of both C and C++ components is a
makefile project (previously called standard make).

Pse look at following code extract:

--- C code extract ------------------
#if defined PL_OS9
IEC61850_API_create(IEC61850_API* p_iec_api, char *modul_name,  IEC_API
*p_api, u_int32 size_brcb, un_int32 size_urcb, u_int32 color)
#elif defined PL_LINUX
IEC61850_API_create(IEC61850_API* p_iec_api, char *modul_name, IEC_API
*p_api, size_t size_brcb, size_t size_urcb, void *map_address, int proj_id)
#endif // defined PL_OS9
--- C code extract  end ---------------------

So we have a conditional compilation and code is OK if one (and only
one) of PL_OS9 or PL_LINUX is defined.
In our case PL_LINUX is indeed defined. The definition is not here but
in some header file and eclipse fails to see that so all code is
highlighted as Unused.
The bigger problem, however is that because of this the code renders as
having syntax error so we get warning.

If it is not possible to instruct eclipse to include headers I would be
happy enough to disable this warning.
How can i do it (disabling Highlight inactive code doesn't remove the

Ilija Kocho

cdt-dev mailing list

Back to the top