Skip to main content

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

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 ------------------
error_code
#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
warning)?

Regards
Ilija Kocho




Back to the top