Re: Update coding standards wrt. C99?
| From: | Christoph M. Becker | Date: | Wed, 06 May 2020 11:06:27 +0000 |
| Subject: | Re: Update coding standards wrt. C99? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110039@lists.php.net to get a copy of this message | ||
On 06.05.2020 at 12:52, G. P. B. wrote:
> On Wed, 6 May 2020 at 12:20, Xinchen Hui <laruence@php.net> wrote:
>
>> mixing declarations and codes sometimes brings unexpected
>> varaibles overriden and hard to debugging.
>
> In a perfect world we would be able to enable the -Wshadow GCC
> compiler warning which would shout when such bugs could pop out,
> however variable shadowing is pretty common in the engine, and
> unless someone knows a way to "baseline" the current warnings such
> that only new/refactored code warns it seems like a long shot to get
> to a state where we can do that.
Isn't variable shadowing only an issue with nested blocks?
--
Christoph M. Becker