For the one to ask your question, wrote a trivial structure
struct Test { const static size_t sz = sizeof(system("")); char s[sz]; // первое системное слово char ss; // второе системное слово Test() : ss('?') { for (size_t i = 0; i < sz - 1; ++i) s[i] = 'a' + 1; s[sz] = sz + '0'; //инициализирую второе системное слово } }; In principle, in the structure, I initialize the symbol by going out of the array.
Now the question is: Is this UB specifically for this definition? And if my ss symbol takes the value that I assigned to s[sz] , then on other systems there may be another principle of field alignments?
int system(const char *)can change or thus determine the size of theinttype? - avp