On AIX 7.2 gcc-8 is still default gcc from AIX Toolbox soon we will be moving to gcc-10 as default.
So right now gcc (/opt/freeware/bin/gcc) will point to gcc-8 only.
You can install gcc-10 together will gcc-8 and you will have to use it as gcc-10.
In your case I think first you should update gcc-8 and other subrpms of gcc-8 to latest and if it is at latest then try to reinstall it that will fix the header file issues.
If you want to have gcc-10 as well then install gcc10 and its libraries and subrpms and use it with gcc-10.
If I am not wrong then using gcc-10 points to gcc-10 library first.
Following is same dump of a binary that compiled with gcc-10 and in library search path gcc-10 library path is first
***Import File Strings***INDEX PATH BASE MEMBER0 /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/../../..:/opt/freeware/lib:/usr/lib:/lib1 libc.a shr.oI think best is to reinstall gcc8 and all gcc8 related rpms with "dnf reinstall <packages> or "yum reinstall <packages>"
------------------------------
SANKET RATHI
------------------------------