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

Comments

@lvc
Copy link

@lvc 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 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

@pragmaware pragmaware commented Jun 30, 2016

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

@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

@pragmaware pragmaware commented Sep 16, 2016

This should be fixed by #1119.

@pragmaware pragmaware closed this Sep 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants