Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C: A function is detected as variable #1012

Closed
lvc opened this issue Jun 29, 2016 · 3 comments
Closed

C: A function is detected as variable #1012

lvc opened this issue Jun 29, 2016 · 3 comments
Assignees

Comments

@lvc
Copy link

lvc commented Jun 29, 2016

Hello,

The ctags e5b7a25 detects a function as variable in the header epan/except.h of the Wireshark library:

WS_DLL_PUBLIC void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *);

The command

ctags -x --c-kinds=fpvx --language-force=c epan/except.h | grep except_unhandled_catcher

returns:

except_t variable 100 epan/except.h WS_DLL_PUBLIC void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *);

However it's a function except_unhandled_catcher (both return value type and parameter type are function pointers).

Thank you.

@b4n
Copy link
Member

b4n commented Jun 29, 2016

I can confirm this, and that the old C parser got that one right. Ignoring/removing WS_DLL_PUBLIC doesn't change anything in either case.

$ ./ctags -x --OldC-kinds=+pv --languages=OldC /tmp/1012.c
except_unhandled_catcher prototype     1 /tmp/1012.c      WS_DLL_PUBLIC void (*except_unhandled_catcher(void (*)(except_t *)))(except_t *);

@pragmaware
Copy link
Contributor

jeez... this syntax is hard :D
I'll try to make sense of it.

@masatake masatake added Parsers and removed Parsers labels Jul 4, 2016
@masatake masatake changed the title A function is detected as variable C: A function is detected as variable Jul 13, 2016
pragmaware added a commit that referenced this issue Sep 16, 2016
@pragmaware
Copy link
Contributor

This should be fixed by #1119.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants