User forums > General (but related to Code::Blocks)

Code completion and Symbols Browser problem

(1/1)

BrianSidebotham:
Hi All,

There seems to be a funny in the symbols browser which affects the code completion.

Take the following piece of code:


--- Code: ---typedef struct strType
    {
        unsigned char El1;
        unsigned char El2;
        unsigned char El3;
    } New_t;

New_t NewTypeStructure;

int main(void)
{
    NewTypeStructure
}

--- End code ---

This gives the symbol NewTypeStructure under the Global Variables section of the symbols browser, and code completion gives it as a suggestion as I type. However, it will not show me the structures elements, or show me the New_t type as a structure in the symbols browser.

Now take the following piece of code:


--- Code: ---struct strType
    {
        unsigned char El1;
        unsigned char El2;
        unsigned char El3;
    } NewTypeStructure;

int main(void)
{
    NewT
}

--- End code ---

In this example, the symbols browser adds strType to the symbols browser, and you can see the elements of the structure in the symbols browser. However, NewTypeStructure is not offered by code completion any more and the same applies that auto completion does not offer the elements for completion.

Interestingly, NewTypeStructure in the last example does not get added to the Global Variables, even though it is now a global variable with structure strType.

I'm coding for an embedded target, so I'm completely coding in C. Maybe there's something to click in order to get the symbols browser to scan code for c structures?

This is with the 1.0 Rev 2946 version of c::b

Best Regards,

Brian.

mandrav:
C-style structs and typedefs are not yet supported...

BrianSidebotham:
Cool. Is this a limitation of C::B? or a different project? (Sorry, I don't know what is used to generate the symbols list)

I presume this is already a development task and doesn't need to be added as a feature request?

Brian.

mandrav:

--- Quote from: BrianSidebotham on September 07, 2006, 12:30:01 pm ---Is this a limitation of C::B? or a different project? (Sorry, I don't know what is used to generate the symbols list)

--- End quote ---

We are using a hand-crafted tokenizer/parser.
And yes, it is under development.

Navigation

[0] Message Index

Go to full version