Gcc 12.2 compiling error with current master (269c0a55)
After fixing the compiling error with std::iterator (suggested fix in !384 (merged)), another compiling issue with gcc 12.2 was observed, shown as below. Could @sblasi take a look?
[ 68%] Building CXX object source/Lib/CommonAnalyserLib/CMakeFiles/CommonAnalyserLib.dir/__/libmd5/libmd5.cpp.o
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp: In static member function ‘static void IntraPrediction::deriveDimdMode(const CPelBuf&, const CompArea&, CodingUnit&)’:
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp:6992:33: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
6992 | cu.dimdRelWeight[i+1] -=1;
| ~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.h:43,
from /usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp:38:
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/Unit.h:354:18: note: at offset [-3, -1] into destination object ‘CodingUnit::dimdRelWeight’ of size 6
354 | int8_t dimdRelWeight[DIMD_FUSION_NUM]; // max number of predictions to blend
| ^~~~~~~~~~~~~
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp: In static member function ‘static void IntraPrediction::deriveDimdMode(const CPelBuf&, const CompArea&, CodingUnit&)’:
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp:6992:33: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
6992 | cu.dimdRelWeight[i+1] -=1;
| ~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.h:43,
from /usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/IntraPrediction.cpp:38:
/usr/local/google/home/xlxiangli/program/g-ecm/source/Lib/CommonLib/Unit.h:354:18: note: at offset [-3, -1] into destination object ‘CodingUnit::dimdRelWeight’ of size 6
354 | int8_t dimdRelWeight[DIMD_FUSION_NUM]; // max number of predictions to blend
| ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors