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: enum elements defined between #else-#endif are never output #3766

Open
shosakam opened this issue Jul 6, 2023 · 0 comments
Open

C: enum elements defined between #else-#endif are never output #3766

shosakam opened this issue Jul 6, 2023 · 0 comments

Comments

@shosakam
Copy link

shosakam commented Jul 6, 2023

The command line you used to run ctags:

$ ctags -R -f tags

The content of input file:

typedef enum {
	CMD_ID_0,
	CMD_ID_1,
#ifdef ENABLE_A
	CMD_ID_A2,
#else
	CMD_ID_B2,
#endif
	CMD_ID_3,
} CMD_ID;

void main(void)
{
}

The tags output you are not satisfied with:

CMD_ID	main.c	/^} CMD_ID;$/;"	t	typeref:enum:__anon0d38083b0103	file:
CMD_ID_0	main.c	/^	CMD_ID_0,$/;"	e	enum:__anon0d38083b0103	file:
CMD_ID_1	main.c	/^	CMD_ID_1,$/;"	e	enum:__anon0d38083b0103	file:
CMD_ID_3	main.c	/^	CMD_ID_3,$/;"	e	enum:__anon0d38083b0103	file:
CMD_ID_A2	main.c	/^	CMD_ID_A2,$/;"	e	enum:__anon0d38083b0103	file:

CMD_ID_B2 entry does not exist.
Please note that ENABLE_A is not defined.

The version of ctags:

D:\test> ctags --version
Universal Ctags 6.0.0(v6.0.0), Copyright (C) 2015-2022 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Dec 16 2022, 02:15:28
  URL: https://ctags.io/
  Output version: 0.0
  Optional compiled features: +win32, +wildcards, +regex, +gnulib_regex, +internal-sort, +unix-path-separator, +iconv, +option-directory, +xpath, +json, +interactive, +yaml, +case-insensitive-filenames, +packcc, +optscript, +pcre2

How do you get ctags binary:

ctags-win32 project page

@masatake masatake changed the title enum elements defined between #else-#endif are never output C: enum elements defined between #else-#endif are never output Jul 6, 2023
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

1 participant