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: Sun, 24 Apr 2011 22:28:51 +0900

Jean-Marc Saffroy said:
> Unfortunately there is still a lot of old K&R code lying around. To me, it
> would be a pity if global dropped support for K&R.

Ezolt, Phillip said:
> Ouch. Yeah... we don't want to do that. I think we need k&r support.

OK. I won't stop the support of K&R.

> Ok.. Ok. How about THIS rule.. (if this even possible?)
> 
> If we see a semicolon, AND then we see an open paren BEFORE we see an open b=
> race, we know the token before the paren is a function and the previous func=
> tion is complete?
> 
> That would catch this:
> A() bob;
> int foo() <=3D=3D=3D=3D this paren means the previous symbol is complete
> {
> }
> ...
> But not k and r:
> A(bar)
> int bar;
> {
> }

It seems not to be able to handle the following K&R example:

int sort(v, n, cmp)
char *v[];
int n;
int (*cmp)();
{
        ...
}
--
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]