I would like to know what happens when there are more initializers than array size, e.g. :
int t[3] = { 1, 2, 3, 4 };
Of course, my compiler warns it. I expected undefined behavior, but I didn’t find any clause about it in C11 standard. So, did I miss something ?
The code is ill-formed in both C and C++.
C++11 §8.5.1[dcl.init.aggr]/6 states:
C11 §6.7.9/2 states: