Link Copied
I think you mean warning #2023 not #2022, right? The one that looks like:
sptxl8-483> cat t.cpp
struct C {
int i;
C(): j(5), i(3) {;}
int j;
};
sptxl8-484> icpc -Weffc++ -c t.cpp
t.cpp(4): warning #2023: Effective C++ Item 13 initialize fields in order they are declared
C(): j(5), i(3) {;}
^
Anyway since we are not going to make users who don't care about the effective C++ checking pay the price for doing thesemanticanalysis you need to turn on -Weffc++ to execute the code that does the checking.
Once you have added the -Weffc++ option your only choice is to individually disable the warningsyou don't care about (using -diag-disable:number). It looks like there are a total of about 40 separate warnings so it might be painful to disable them all individually but that is your only choice. The effective C++ warningsare in the range from warning 2012 up to and including warning number 2049.
Judy
For more complete information about compiler optimizations, see our Optimization Notice.