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)

kesselhaus wrote:
> a) Does your file include the header defining the PL_OS9 or L_LINUX?
Sure it does (although indirectly through other header(s)). Otherwise it
wouldn't compile (this is a relatively mature code edited with previous
Eclipse releases, and runs in a number of instllations).
> b) If not, you might do:
>   - Add the current define in the projects settings under
> Paths&Symbols page
I already did it. It is a workaround indeed, but it means that every
time I change these defines in my C/C++ headers I'll have to note Eclipse.

So far i tolerated wrong "highlight unused code" (which i can disable
btw) but this "syntax error" is annoying and frankly, I don't need it
since the compiler will generate errors. Is there a way to disable it?

Another question: What does Exporting of symbols and includes mean?
Where are they exported to?
>   - Change the indexer settings (either system wide or project
> specific) and set the 'Index all headers (files neither built nor
> included also)'
Tried, doesn't help.
> 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 ------------------
>> 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
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top