This feels like the right solution.

ANSI C has been around for a long time... I'm pretty sure we'd be able to turn 
on the ANSI mode, and get the benefit of the better parsing.

Fwiw..  I wonder if old k and r compilers could even handle these wacky macros. 
(if not.. You might never see these in this files..)

   Long term, global might need a way to specify ANSI on a file by file basis 
for really big code bases.  (since some code bases may contain both..)

(or would the preferred solution be to build multiple tag files (some in k and 
r, some in ANSI), and the combine them together somehow?)

Cheers,
--Phil

On Apr 27, 2011, at 8:27 PM, "Shigio YAMAGUCHI" <[email protected]> wrote:

>> I fully second that. Macros should only be considered on a "best
>> effort" basis. 
> 
> "best effort" might be making two modes.
> 
> When calmly thinking, the issue becomes complex because I try to
> support both ANSI and K&R at the same time.
> I'm thinking about making ANSI mode.
> 
> In ANSI mode, it is thought that programs are written only by ANSI style.
> The macro problem below can be solved at least in ANSI mode.
> 
>> STRUCT_DEF_MACRO(my_struct, int) struct_instance_name;
>> 
>> void test_func(long dummy1, long dummy2)
>> {
> 
> The mode is specified by some environment variable.
> 
> % gtags            <= the same behavior as old times
> % setenv GTAGSANSIC 1
> % gtags            <= ANSI C mode
> 
> The default mode is left as it is.
> If everyone agrees, the ANSI mode will become new default mode.
> When programs written by K&R disappear from the world,
> I would like to delete old mode.
> 
> What do you think?
> --
> 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

Reply via email to