Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.4.1
-
None
Description
Compiling with the qdebug.h include before the qbitarray.h include seems to turn off the /Zc:forScope in VS and outputs the warning:
1>.\main.cpp(13) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
1> .\main.cpp(12) : definition of 'i' used
1> .\main.cpp(7) : definition of 'i' ignored
Swithcing the order of the includes will make the warning go away.
#include "qdebug.h" #include "qbitarray.h" int main(int argc, char **argv) { for (int i = 0; i < 5; i++) { } char arr[2]; int i = 0; arr[i] = 'a'; }
Seen on VS2005.