Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#40 Anonymous enums

open
None
5
2011-05-29
2011-05-29
Hari Rangarajan
No

This maybe a request more than a bug. Can nameless enums be tagged with an appropriate "e" marker? Ctags does generate unique names for anonymous enums; could there be atleast an empty "e" tag for identifying the start of an enum. The current output just shows "m" tag members without any parent reference.

test code --->>>
typedef enum {
a = 1,
b = 2
} testenum_t;

No enum tag marker --->>>
cscope.out:
@enum_test.c

2
ma
= 1,

3
mb
= 2

4 }

P.S: This is for the ccglue project. I'm attempting to build a self-contained version using only a cscope database; however, the enum issues are hurting accuracy.

Discussion

  • Different enum declarations

     
    Attachments
    • labels: 388879 -->
     
  • This is quite clearly a feature request. Moved there.

     
  • > Can nameless enums be tagged with an appropriate "e" marker?

    Not really, since there is no marker that would be "appropriate". An anonymous enum really doesn't define any such marker.

     
  • My request here is to be able to identify the "m" markers as belonging to an anonymous enum structure. The lack of a preceding "e" marker makes it very hard to identify it as a enum member.

    On the topic of appropriateness, Ctags does generates unique names for anonymous enums, For cscope, if the parser capable of identifying the anonymous enum, can't we just create unique names such as __anon__enum__XX, where XX is a counter. Or otherwise, can we just have a NULL "e" marker.

    Thanks again for looking into this request!