3 ms·
The optional comma at the end of the list of entries in an array is explicitly allowed by the C standard.
by cperciva 11y ago
The optional comma at the end of the list of entries in an array is explicitly allowed by the C standard.
- CamperBob2 11y ago(Actually I may be confusing the extra comma here with an extra comma at the end of an enum list. Some compilers are OK with that, while others aren't.)
- 1amzave 11y agoIf I'm reading N1256 right (not sure how far back it actually dates, but that's a C standard draft dated 2007), section 6.7.2.3 also explicitly allows a trailing comma in that context as well, so if such a compiler exists its makers should get with the program, so to speak.