This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F280041: Initialization of static variable with nested structure in COFF mode

Part Number: TMS320F280041


Tool/software: TI C/C++ Compiler

Hi,

Consider we have two structures defined as follows:

struct child {
    int a;
    int b;
};

struct parent {
    int c;
    struct child child;
    int d;
};

Now if I create a static parent object and explicitly set field 'd' to some value, what happens with other fields?

static struct parent = {
    .d = 0,
};

I know that by COFF standard, field 'c' should be set to 0, but what happens with the nested structure. Is it left uninitialized?