That was solved in the newer versions of aCC. I had no issues compiling most contemporary code all the way ‘till 2014 when I finally retired my private HP-UX server infrastructure. For particularly badly written software, there was GCC on HP-UX.
GCC wasn't an option on our case back then, as we were required to use the system compilers due to our customer base.
I don't understand what that would have to do with anything, as long as you made a PSF SD-UX "gcc-runtime" fileset with libgcc_s.so.1 in it. That's what I did, worked just fine.
Our customers required being able to build our product with the system compilers managed by their IT.
GCC was only accepted by customers with Linux installs.
Asking GCC to be available in any sort was not an option for other customers. In fact was a deciding factor why we got some contracts back then, as we always cope with whatever they had.
But on HP-UX 11 we still had a version of aCC that was a mix between ANSI and K&R, so it was the variant with more pre-processor logic.