bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues forcing C++


From: Shigio YAMAGUCHI
Subject: Re: Issues forcing C++
Date: Sat, 13 Feb 2021 20:16:19 +0900

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 <jadoxa@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 <shigio@gnu.org>
PGP fingerprint:
26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]