Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: oli82 on September 01, 2010, 02:27:02 pm

Title: Parser doesn't work for typedef struct with attribute
Post by: oli82 on September 01, 2010, 02:27:02 pm
I have the following code:

typedef struct struct1 __attribute__ ((packed)) {
   unsigned char u8Char1;
} struct1_T;

With this "__attribute__ ((packed))" the parser doesn't recognise the struct and and it doesn't show up in the symbols list and it isn't suggested when I start to write stru...
If I comment this out it works just fine.

In a more complex code with several structs the little pop-up which should show the members does not show no members but the wrong ones from another struct without this typedef. I could life with no suggestions but the wrong ones are quite confusing.

Does anybody know this error and is there anything I can do?
Title: Re: Parser doesn't work for typedef struct with attribute
Post by: blueshake on September 02, 2010, 03:56:21 am
em, it seems not support such definition like this struct1 __attribute__ ((packed))


only work for :

typedef struct struct1 __attribute__ {
   unsigned char u8Char1;
} struct1_T;