I have a code example (strange macros I agree, but they come like this from a library so we have to use what we've got).
SE auto-completion works fine in v22.0.2.1, but not in beta v23.0.0.5 (Win7x64).
Normally I define the PACKSTRUCT in the Workspace Properties -> C/C++ Preprocessing, but now I added it in the test example itself, just to prove the behavior.
Please let me know if you can confirm the issue and if you can find a quick fix. Thank you!
Here's the Ansi-C main.c file which I tested in both SE versions:
#define PACKSTRUCT( xx ) xx
//#define PACKSTRUCT( xx ) __packed xx
//#define PACKSTRUCT( xx ) xx __attribute__((__packed__,gcc_struct))
//#define PACKSTRUCT( xx ) xx __attribute__((__packed__))
//#define PACKSTRUCT( xx ) __packed xx
//#define PACKSTRUCT( xx ) __pragma( pack(push, 1) ) xx __pragma( pack(pop) )
typedef struct {
unsigned char bytes[8];
} struct_of_bytes;
#if 1
PACKSTRUCT(
struct packed_struct_of_bytes { // <- placing the cursor on "packed_struct_of_bytes" doesn't show any definition
struct_of_bytes nAddress; // struct_of_bytes is still understood here
}
);
void main(void)
{
struct packed_struct_of_bytes addr1; // <- placing the cursor on "packed_struct_of_bytes" doesn't show any definition
// like SE cannot parse PACKSTRUCT macro....
addr1. // <- no completion here in beta v23.0.0.5. But works fine v22.0.2.1
}
#else
// this works always:
// when I type "addr1." SE will complete with "nAddress" after another "." will again complete with "bytes"
struct packed_struct_of_bytes {
struct_of_bytes nAddress;
};
void main(void)
{
struct packed_struct_of_bytes addr1;
// this works fine
addr1.nAddress.bytes[0] = 0;
}
#endif