component/gcc: Fix compilation with gcc-10

Patches taken from https://github.com/spack/spack/pull/15403
6 jobs for 1.0
Status Job ID Name Coverage
  External
passed SlapOS.SlapRunner.ResilienceTest-Master

failed SlapOS.SlapRunner.ResilienceTest-Master.ERP5

failed SlapOS.SoftwareReleases.IntegrationTest-Master.Python2

11:47:11

failed SlapOS.SoftwareReleases.IntegrationTest-Master.Python3

02:18:20

failed SlapOS.SoftwareReleases.IntegrationTest-Master.Python2

failed SlapOS.SoftwareReleases.IntegrationTest-Master.Python3