bug-global
[Top][All Lists]
Advanced

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

Re: With a wacky macro before it, 'global' appears to miss a function


From: Shigio YAMAGUCHI
Subject: Re: With a wacky macro before it, 'global' appears to miss a function
Date: Thu, 28 Apr 2011 09:25:38 +0900

> 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 <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3



reply via email to

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