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 644291 - Enum parser breaks on assignment of ')'
Enum parser breaks on assignment of ')'
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.18
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-09 09:49 UTC by Jonny Lamb
Modified: 2011-03-29 10:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonny Lamb 2011-03-09 09:49:16 UTC
I have an enum:

/**
 * WockyNodeBuildTag:
 * @WOCKY_NODE_START: foo
 * @WOCKY_NODE_TEXT: bar
 * @WOCKY_NODE_END: milk
 * @WOCKY_NODE_ATTRIBUTE: comes
 * @WOCKY_NODE_XMLNS: from
 * @WOCKY_NODE_ASSIGN_TO: cows
 *
 * Tags for building a stanza using wocky_stanza_build() or
 * wocky_node_add_build().
 */
typedef enum
{
  WOCKY_NODE_START = '(',
  WOCKY_NODE_TEXT = '$',
  WOCKY_NODE_END = ')',
  WOCKY_NODE_ATTRIBUTE = '@',
  WOCKY_NODE_XMLNS = ':',
  WOCKY_NODE_ASSIGN_TO = '*'
} WockyNodeBuildTag;

Yet I get warnings from gtk-doc:

/home/jonny/src/wocky/wocky/wocky-node.h:41: warning: Value described in source code comment block but does not exist. ENUM: WockyNodeBuildTag Value: WOCKY_NODE_TEXT.
/home/jonny/src/wocky/wocky/wocky-node.h:41: warning: Value described in source code comment block but does not exist. ENUM: WockyNodeBuildTag Value: WOCKY_NODE_END.

It turns out that gtk-doc doesn't like the WOCKY_NODE_END = ')' assignment. Replacing that with some other value like its actual value makes the parsing warning-free
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-09 13:44:00 UTC
Yes, you are trying very hard to confuse the parser. Wanna try making a patch?
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-29 10:17:35 UTC
commit 22f5b79167c8eeb048b4b18a4b4a4b7f935d2c28
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Tue Mar 29 13:14:00 2011 +0300

    common: when parsing enums, only supress () pairs on one line
    
    Previously this was matching a "(.*)" sequence across lines and thus could
    hide enums that contain brackets as character constant.
    
    Fixes: #644291