Strange warning when compiling my private classes


Please read tips for efficient and successful posting and posting code

Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.

ROOT Version: 6.40.02
Platform: EL9
Compiler: gcc13

Hi all,

Via cvmfs (LCG_110) I use ROOT 6.40.02 with gcc13 on our EL6 cluster and I get the following strange warning for each of my private classes that I compile, which I don’t get if I use the previous LGC_107 release.

/cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/RConfigure.h:29:4: warning: #warning “The C++ standard in this build does not match ROOT configuration (202002L); this might cause unexpected issues” [-Wcpp]
29 | # warning “The C++ standard in this build does not match ROOT configuration (202002L); this might cause unexpected issues”
| ^~~~~~~
In file included from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/ROOT/RConfig.hxx:23,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/RtypesCore.h:37,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/Rtypes.h:23,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/TObject.h:16,
from /cvmfs/sft.cern.ch/lcg/releases/ROOT/6.40.02-6fb7c/x86_64-el9-gcc13-opt/include/TNamed.h:25,
from NcSample.h:8,
from NcSample.cxx:85:

Can someone explain me what is going on here and how I can get rid of the warning.

Note that I want to keep the -Wcpp option on my gcc compilation so that I can check possible inconsistencies w.r.t. standard C++.

Cheers,

Nick.