How does a C struct ignore internal order for the compiler?

For example, we have two structures:

struct type1 {
    int  t;
    char c;
};

struct type2 {
    char c;
    int  t;
};

At what point does the C compiler ignore the difference in order and set them as the same structure? And How?

+4
source share
1 answer

At what point does the C compiler ignore the difference in order and allow them to be the same structure? And How?

, . , , , , , , . struct type1 struct type2 .

+7

Source: https://habr.com/ru/post/1537270/


All Articles