Building root with standard set to C++20 results in compilation errors on Linux

Hi @eguiraud, so I just updated gcc/g++ to version 10.5.0 and went ahead and checked out the v6-30-00-patches branch (see attached config results here config-log.txt (14.2 KB)).

Now I started the build and I do still see these warning as it builds, but doesn’t result in any compilation error:

In file included from /home/jade/root/linux-build/include/ROOT/RConfig.hxx:23:
/home/jade/root/linux-build/include/RConfigure.h:30:4: warning: "The C++ standard in this build does not match ROOT configuration (201709L); this might cause unexpected issues" [-W#warnings]
#  warning "The C++ standard in this build does not match ROOT configuration (201709L); this might cause unexpected issues"

I don’t know why these warnings are reappearing when I did update to a newer gcc/g++ compiler and built it with branch v6-30-00-patches.

Anyway, the build did finish without compilation errors despite that warning. Do I need to be concern of that warning – that is, is it going to produce undefined behaviors while using root?


P.S. concerning my earlier builds that failed (when I had the wrong branch and older compiler), shouldn’t the cmake configuration fail when I tried to set the C++ standard to C++20 against a git branch (v6-28-06) that didn’t support it (that is the cmake files should have verified the max C++ standard it supported). It would have save a lot of confusion on why the build was failing.