I am using g ++ 4.3.0 to compile this example:
#include <vector> int main() { std::vector< int > a; int b; }
If I compile the example with the maximum warning level, I get a warning that the variable b is not used:
[ vladimir@juniper data_create]$ g++ m.cpp -Wall -Wextra -ansi -pedantic m.cpp: In function 'int main()': m.cpp:7: warning: unused variable 'b' [ vladimir@juniper data_create]$
Question: why the variable a is not indicated as not used? What parameters do I need to pass to get a warning for variable a ?
c ++ gcc gcc-warning g ++
BЈoviћ
source share