[osg-users] Warnings in compiling...

Mario Valle mvalle at cscs.ch
Mon Sep 24 03:30:04 PDT 2007


It is a "feature" of Microsoft Visual Studio...
In this case it is harmless, but annoying.
Ciao!
		mario


Robert Osfield wrote:
> 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 <3dhelp at gmail.com> 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
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

-- 
Ing. Mario Valle
Visualization Group                              | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82



More information about the osg-users mailing list