This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Missing documentation regarding initialization with {} in C?


There was recently a discussion with confusion regarding initialization with {} instead of {0} when initializing an empty array or struct. The former is not valid in C, but GCC permits it anyway even though it's not explained anywhere in the specs:
char something[20] = {};

Is it missing from the specs or did I just fail to locate it? I checked all the C extension pages but none of them had it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]