bug-grep
[Top][All Lists]
Advanced

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

Re: update to latest gnulib and clean-up


From: Jim Meyering
Subject: Re: update to latest gnulib and clean-up
Date: Thu, 28 Apr 2011 23:11:19 +0200

Eric Blake wrote:
> On 04/28/2011 11:12 AM, Paul Eggert wrote:
>> On 04/28/11 01:52, Jim Meyering wrote:
>>> These changes fix typos, add explicit "extern" keywords
>>> (preparing for...)
>>
>> What does that "..." stand for?  (Sorry, I don't
>> remember the justification for explicit "extern".)
>
>>> add explicit "extern" keywords
>>> (preparing for...), add a syntax check to enforce scoping policy
>
> That is, one commit added extern keywords, so that the next commit could
> use the presence of extern keywords to check whether scoping policy is
> being properly followed.
>
> It doesn't help or hurt C to have the explicit extern, other than having
> the explicit extern makes source code easier to pass through perl to
> validate whether non-static declarations were intentionally meant to be
> externally visible, rather than accidentally missing 'static'.

Thanks for replying.  That's it exactly.

The rule computes the list of "externally scoped" variables and
functions two different ways each.  Once via nm, and once by
applying perl to the sources, relying on "extern" and a particular
and consistent style of code formatting.
If the two lists don't match (modulo heuristics), then that's
a syntax-check failure.



reply via email to

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