Here's an example:
int main ()
{
int a[] = {1, 2, 3,};
}
Note the extra , after 3. There is no warning even with -Wall and everything. I noticed this while reading some coreutils code that seemed to have a comma after the last element of an array. Is this UB, implementation-defined, or fine as is?
Fine as is. The C standard permits it.