classification
Title: Extra comma in enum - fails on AIX
Type: compile error Stage:
Components: Build Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, srid, trentm
Priority: normal Keywords:

Created on 2009-04-30 18:44 by srid, last changed 2009-05-01 16:18 by georg.brandl. 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
2009-05-01 16:18:31georg.brandlsetmessages: + msg86888
2009-05-01 15:47:56sridsetmessages: + msg86887
2009-05-01 08:52:40georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg86871

resolution: fixed
2009-04-30 18:45:23sridsetmessages: + msg86852
2009-04-30 18:44:37sridcreate