{ initializer-list , }

Bj|rn Carlsson bjornc at kuling.UUCP
Wed Mar 2 00:21:50 AEST 1988


Why is an optional trailing comma inside the braces after an initializer-list
allowed? Since it doesn't affect the meaning of the initializer we can't
see any other reasons for including it except historical. Is it included
in the Draft proposed ANSI C? We are currently writing a compiler for a
subset of C and got a bit confused when finding this strange syntax.
It is documented in both K&R and Harbison&Steele (2nd ed.).



More information about the Comp.lang.c mailing list