In article <41*************************@posting.google.com> , Mantorok Redgormor wrote:
struct mystruct {
int a;
int b;
};
struct mystruct x = { 10, 10 }, y = x;
What section in the standard says that y needs a constant?
And why can't it resolve x so that y can have a copy of its values?
In ISO/IEC 9899:1990 the "Constraints" subsection of the
"6.5.7 Initialization" section contains the sentence:
All the expressions in an initializer for an object that has
static storage duration or in an initializer list for an object
that has aggregate or union type shall be constant
expression.