After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 629667 - MY_ENUM_VALUE = <constant> only works for last member
MY_ENUM_VALUE = <constant> only works for last member
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-09-14 14:50 UTC by Owen Taylor
Modified: 2018-01-25 15:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
regress: Check that enum value assignments work for all members (3.34 KB, patch)
2013-08-26 11:43 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Owen Taylor 2010-09-14 14:50:28 UTC
typedef enum
 {
   REGRESS_TEST_VALUE1,
   REGRESS_TEST_VALUE2,
-  REGRESS_TEST_VALUE3 = 42
+  REGRESS_TEST_VALUE3 = 42,
+  REGRESS_TEST_VALUE4
 } RegressTestEnum;

Doesn't cause the tests to fail - VALUE4 just vanishes. Suspect problem with the yacc grammar, but not immediately obviously to me what.
Comment 1 Emmanuele Bassi (:ebassi) 2013-08-26 11:42:17 UTC
seems this has been fixed, but I'm attaching a patch for the test suite so that we don't regress.
Comment 2 Emmanuele Bassi (:ebassi) 2013-08-26 11:43:10 UTC
Created attachment 253120 [details] [review]
regress: Check that enum value assignments work for all members

Value assignments can happen at any point in the enumeration
declaration.
Comment 3 André Klapper 2015-02-07 17:16:57 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 4 Emmanuele Bassi (:ebassi) 2018-01-25 15:55:10 UTC
Attachment 253120 [details] pushed as 832602b - regress: Check that enum value assignments work for all members