Hi,
My gtags behaves strange when parsing this code:
1 #define FOO
2
3 int foo1()
4 {
5 if (1)
6 {
7 #ifndef FOO
8 #else
9 }
10 #endif
11 return 1;
12 }
13
14 int foo2()
15 {
16 return 1;
17 }
The function foo2 was ignored:
$ gtags --verbose
[Wed Aug 05 21:32:12 CST 2015] Gtags started.
[Wed Aug 05 21:32:12 CST 2015] Creating 'GTAGS' and 'GRTAGS'.
[1] extracting tags of test.c
[Wed Aug 05 21:32:12 CST 2015] Done.
$ gtags -d GTAGS
__.COMPNAME __.COMPNAME
__.COMPRESS __.COMPRESS ddefine ttypedef
__.VERSION __.VERSION 6
FOO 1 @n 1 address@hidden @n
foo1 1 @n 3 int @n()
My gtags version is 6.5:
$ gtags --version
gtags (GNU GLOBAL) 6.5
Copyright (c) 2015 Tama Communications Corporation
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cat /etc/issue
Ubuntu 15.04 \n \l
$ uname -a
Linux 7 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I think it's the same error when gtags parsing MySQL sql_parse.cc at line 1983 to line 2002. All functions after line 2001 was ignored.
I'm sorry that my English is poor. If you need more information, please let me know.
Thanks for your hard on GNU global!