Hello, Thanks for fixing it so quickly! Keep up the good work! :) Perhaps it might be an Idea to update the error message as well? The 'GTAGS seems older format' feels like an odd response to a possibly corrupted tags file. Perhaps 'Could not read GTAGS file properly. Were tags created successfully with a non-zero exit code?' might be a bit more appropriate?
Regards, Gustaf 2016-09-03 11:27 GMT+02:00 Shigio YAMAGUCHI <[email protected]>: > Hi, > You are right. I have rewritten the source code slightly > using 'goto finish' method. > > RCS file: /sources/global/global/libparser/Cpp.c,v > retrieving revision 1.22 > diff -r1.22 Cpp.c > 239,240c239,243 > < } else if (c == EOF) > < die("failed to parse template [+%d %s].", savelineno, curfile); > --- >> } else if (c == EOF) { >> if (param->flags & PARSER_WARNING) >> warning("failed to parse template [+%d %s].", savelineno, curfile); >> goto finish; >> } > 583a587 >> finish: > > > By the way, in the current GLOBAL, each parser can stop > the program itself. In that case, the tag files get corrupted. > When gtags ends with status != 0, you should not use them. > > Regards > Shigio > > > 2016-09-02 16:47 GMT+09:00 Gustaf Waldemarson > <[email protected]>: >> >> Hello Global Maintainers, >> >> I seem to have run into one or possibly two bugs while trying out >> Global: >> >> Recipe: >> >> 1. Create a new directory for testing: >> - mkdir debug >> >> 2. Create a new file in the directory e.g. `main.cpp' with the contents: >> >> #include <iostream> >> >> #define TEST_MACRO struct test< >> >> int main(void) >> { >> std::cout << "hello, world!" << std::endl; >> return 0; >> } >> >> 3. Generate tags: >> - `gtags' >> - Bug 1: Parser error: `gtags: failed to parse template [+3 >> ./main.cpp].' >> >> 4. Trying to use the generated tags then leads to possibly different >> bug: >> - `global -u' >> - Bug 2: `gtags: /home/guswal01/git/debug/GTAGS seems older >> format. Please remake tag files.' >> >> This occured on `Global 6.5'.4 when built on Ubuntu 15.10 using the >> default `sh reconf.sh && ./configure' settings. >> >> In my opinion, failing to parse some odd C++ file is usually fine, but >> in in this it seems like the tag files get corrupted somehow. >> >> _______________________________________________ >> 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 _______________________________________________ Bug-global mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-global
