Issue 5889: Extra comma in enum - fails on AIX (original) (raw)

Created on 2009-04-30 18:44 by srid, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg86851 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-04-30 18:44
cc_r -qlanglvl=ansi -c -DNDEBUG -O -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/unicodeobject.o Objects/unicodeobject.c "Objects/stringlib/string_format.h", line 37.15: 1506-275 (S) Unexpected text ',' encountered. make: *** [Objects/unicodeobject.o] Error 1 Not sure why the extra comma is required in the last enumeration.
msg86852 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-04-30 18:45
typedef enum { ANS_INIT, ANS_AUTO, ANS_MANUAL, <--- Extra comma need to be removed } AutoNumberState; /* Keep track if we're auto-numbering fields */
msg86871 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-01 08:52
The comma isn't required, but it's good practice in Python to end lists with a comma (so that you don't forget adding it when adding new items), and this habit probably made it into C code there. Fixed in r72159.
msg86887 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-05-01 15:47
Georg, should this fix also be applied to the py3k branch as I am able to repro this on 3.1a2?
msg86888 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-01 16:18
Yes, in fact it already has been merged.
History
Date User Action Args
2022-04-11 14:56:48 admin set github: 50139
2009-05-01 16🔞31 georg.brandl set messages: +
2009-05-01 15:47:56 srid set messages: +
2009-05-01 08:52:40 georg.brandl set status: open -> closednosy: + georg.brandlmessages: + resolution: fixed
2009-04-30 18:45:23 srid set messages: +
2009-04-30 18:44:37 srid create