HI Adrian,

This warning looks bogus to me, as the code is valid - the first
iterator is within the scope of a for loop, so should not have any
affect on any later use of another variable declared after the for
loop.  The compiler in this instance is issuing a warning on the
assumption that the developers doesn't know what he's doing and that
Standard C++ isn't really meant to properly scope variables...

Regardless of the silliness of this warning I have gone ahead and
renamed the iterator scoped in the for loop, I believe this should fix
the warning, although I can't verify as gcc 4.x correctly doesn't
issue an warning.

Robert.

On 9/24/07, Adrian Egli <[EMAIL PROTECTED]> wrote:
> Registry.cpp(572) : warning C4288: nonstandard extension used : 'itr' : loop
> control variable declared in the for-loop is used outside the for-loop
> scope; it conflicts with the declaration in the outer scope
>         Registry.cpp(571) : definition of 'itr' used
>         Registry.cpp(564) : definition of 'itr' ignored
> Registry.cpp(572) : warning C4288: nonstandard extension used : 'itr' : loop
> control variable declared in the for-loop is used outside the for-loop
> scope; it conflicts with the declaration in the outer scope
>         Registry.cpp(571) : definition of 'itr' used
>         Registry.cpp(564) : definition of 'itr' ignored
> Registry.cpp(572) : warning C4288: nonstandard extension used : 'itr' : loop
> control variable declared in the for-loop is used outside the for-loop
> scope; it conflicts with the declaration in the outer scope
>         Registry.cpp(571) : definition of 'itr' used
>         Registry.cpp(564) : definition of 'itr' ignored
>
> --
> ********************************************
> Adrian Egli
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to