Xref: utzoo comp.lang.c:31226 comp.std.c:3497 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!island!grenada!christmas!rtm From: rtm@christmas.UUCP (Richard Minner) Newsgroups: comp.lang.c,comp.std.c Subject: enum, no trailing comma? Keywords: enum, ANSI C Message-ID: <8@christmas.UUCP> Date: 17 Aug 90 18:35:58 GMT Organization: Island Graphics, Sacramento, California Lines: 40 Is it just my eyes or does: (From December 7, 1988 DRAFT) 3.5.2.2 Enumeration specifiers Syntax : enum _opt { } enum : , : = mean that a trailing comma: enum foo { one, two, three, }; is disallowed? It sure looks that way. (By the way, there's no way to sneak a comma onto the end of an .) I've been told that nothing really changed from Dec 7, 88 to the final version, but maybe this did, right? (an aside: is it true that nothing changed besides unary + ?) If it really is disallowed, why? It seems out of place, since trailing commas are ok in array and struct initializers. Why so nitpicky here? (gcc ignores the trailing comma unless you specify -pedantic.) Are compiler vendors likely to consider such a comma a real live syntax error? I suppose they have to. (Maybe it was just too hard to specify the syntax to allow a trailing comma? :-) -- Richard Minner || {uunet,sun,well}!island!rtm (916) 736-1323 || || Island Graphics Corporation Sacramento, CA ||