Hello Jason, > If GTAGSFORCECPP is defined and --explain is used and a .h file is first, > gtags > will crash. This is because lastmatch is not set due to match_suffix_list > being bypassed (and so if .h is not first it will show the suffix of the > previous file).
It has been reproduced. It will be fixed in a couple of days. Thank you. > The language is set to "cpp", but only the built-in parser uses that, other > parsers use "C++". This means forcing C++ will use the built-in parser for .h > files, not the desired parser. Since only the built-in parser uses .h as C > the > simple solution is to not force C++ if you're using another parser. Right. I will put it into the TODO list. As a workaround, I would like to change the description of gtags(1)'s manual like follows: [GTAGSFORCECPP] If this variable is set, each file whose suffix is @file{.h} is treated as a C++ source file. | v If this variable is set, each file whose suffix is @file{.h} is forcibly parsed by the built-in C++ parser. Do not set this variable if you are using plug-in parsers. This variable and the built-in C++ parser are deprecated. Regards, Shigio 2021年2月12日(金) 17:04 Jason Hood <jad...@yahoo.com.au>: > > If GTAGSFORCECPP is defined and --explain is used and a .h file is first, > gtags will crash. This is because lastmatch is not set due to > match_suffix_list being bypassed (and so if .h is not first it will show the > suffix of the previous file). > > The language is set to "cpp", but only the built-in parser uses that, other > parsers use "C++". This means forcing C++ will use the built-in parser for > .h files, not the desired parser. Since only the built-in parser uses .h as > C the simple solution is to not force C++ if you're using another parser. > > -- > Jason. > -- Shigio YAMAGUCHI <shi...@gnu.org> PGP fingerprint: 26F6 31B4 3D62 4A92 7E6F 1C33 969C 3BE3 89DD A6EB