User forums > Embedded development

Code Completion and near/far/huge variables


Hi folks!

We're using Code::Blocks since for a couple of months now and I find it is a quite editor  :)

But sometimes the parser is annoying me. Now I found out what the problem is:
I'm coding for Infineon's 16 bit controllers which use different addressing schemes:
near, far and huge data. Variables and constants are marked with these attributes to determine the corresponding adressing scheme.
If I e.g. declare a structure to be "huge" the code completion won't show me any of the structure members. :-\
Without that attribute the members are shown without any problem.

Example code:

typedef struct
  short iVar1;
  short iVar2;

TEST_TY huge tMyStruct;

void Test( void )

In Test at tMyStruct. the effect takes place. Without "huge" it works ...
I've already tried to define huge as primary as well as secondary keyword but that has no effect on parsing.

Does anyone know how to fix that? I'm using C::B 16.1 ...

Thanks for your help  :) and kind regards


B.t.w.: not using the attributes is no choice :)

you can try to add a new keyword set and use it in cc. I don't know if this works...

Settings->Editor->Syntax higlighing->Keywords->Set: 4
Add your keywords

Settings->Editor->Code completion->Keywords sets to additionally include:
make a tick at 4

But! i am not sure if this works....

If BH Suggestion fails, I would add an header the defines HUGE as either hugh or nothing.

--- Code: ---#ifdef XYZ
#define HUGE huge
#define HUGE

--- End code ---

And, replace the XYZ with something your compiler defines.
Edit: Then use HUGH instead of hugh in your code.

Tim S.


[0] Message Index

Go to full version