Hi,
> The function foo2 was ignored:

This problem will solved by the attached patch.
Could you please do like this using the patched version?

$ export GTAGSFORCEENDBLOCK=
$ gtags
$ global -x '.*'
FOO                 1 test.c           #define FOO
foo1                3 test.c           int foo1()
foo2               14 test.c           int foo2()

If there is no problem, I will apply the patch to
the next release of GLOBAL.

> I'm sorry that my English is poor.
Me too. :)

Regards,
Shigio


2015-08-05 23:07 GMT+09:00 刘洋 <[email protected]>:

> 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 #@d @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
> License GPLv3+: GNU GPL version 3 or later <
> http://www.gnu.org/licenses/gpl.html>
> 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
> <https://github.com/mysql/mysql-server/blob/5.6/sql/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!
>
> _______________________________________________
> Bug-global mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-global
>
>


-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

Attachment: block.patch
Description: Binary data

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to