Re: warning that warns about iso compliant code

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

 



On Thu, May 1, 2008 at 9:22 AM, Burlen Loring <burlen.loring@xxxxxxxxxxx> wrote:
>
>  To me it seems the compiler should not warn about code that follows the
>  ISO standard rules. However, it would be nice if the compiler warned about
> the case that didn't follow the standard. I personally like to hide the
> outer variables because it documents the fact that a particular loop does
> not use that variable. Am I just being silly and I should use different
> index variable name for all of my nested loops,even when there are no
> dependencies?
>

I think that when the warning was introduced, it was very, very
important, since it was noting a change in semantics.

I'll agree that now it's becoming less useful, but it's still not
quite been a decade since the standard, so there's quite plausibly
still some legacy code around using the old behaviour.  Perhaps a case
could be made for removing it once -std=gnu++09 becomes the default,
but even then, that kind of shadowing is generally a bad idea, and
it's simple enough to remove -- and make more canonical, with an inner
j -- by simply changing the relevant i's that I'm not convinced
removing the warning is worthwhile.

YMMV,
~ Scott

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux