gcc – GCC12: No compila libcpp: cc1: warning: command-line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C

Compilando GCC12, no compila libcpp… Al parecer el problema es que trata a C++ como si fuera C, pero eso sale como warning y no como error.

Desde aquí empiezan los errores:

make(3): se entra en el directorio ‘/gcc12/gcc/build-x86_64-pc-linux-gnu/libcpp’
g++ -std=c++11 -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include -g -O2 -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo ../.././libcpp/charset.c
cc1: warning: command-line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command-line option ‘-fno-rtti’ is valid for C++/D/ObjC++ but not for C

In file included from ../.././libcpp/include/cpplib.h:27,
                 from ../.././libcpp/charset.c:22:
../.././libcpp/include/line-map.h:330:3: error: expected specifier-qualifier-list before ‘static’
  330 |   static source_range from_location (location_t loc)
      |   ^~~~~~

Registro de lo ya compilado:

/gcc12/gcc make
( -f stage_final ) || echo stage3 > stage_final
make(1): se entra en el directorio '/gcc12/gcc'
make(2): se entra en el directorio '/gcc12/gcc'
make(3): se entra en el directorio '/gcc12/gcc'
rm -f stage_current
make(3): se sale del directorio '/gcc12/gcc'
make(2): se sale del directorio '/gcc12/gcc'
make(2): se entra en el directorio '/gcc12/gcc'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
make  all-recursive
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
Making all in tests
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests'
Making all in .
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests'
make(6): No se hace nada para 'all-am'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests'
Making all in devel
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/devel'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/devel'
Making all in mpn
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpn'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpn'
Making all in mpz
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpz'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpz'
Making all in mpq
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpq'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpq'
Making all in mpf
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpf'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/mpf'
Making all in rand
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/rand'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/rand'
Making all in misc
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/misc'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/misc'
Making all in cxx
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/cxx'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests/cxx'
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tests'
Making all in mpn
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpn'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpn'
Making all in mpz
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpz'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpz'
Making all in mpq
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpq'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpq'
Making all in mpf
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpf'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/mpf'
Making all in printf
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/printf'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/printf'
Making all in scanf
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/scanf'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/scanf'
Making all in rand
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/rand'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/rand'
Making all in cxx
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/cxx'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/cxx'
Making all in demos
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos'
Making all in calc
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/calc'
make  all-am
make(7): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/calc'
make(7): No se hace nada para 'all-am'.
make(7): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/calc'
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/calc'
Making all in expr
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/expr'
make(6): No se hace nada para 'all'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos/expr'
make(6): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos'
make(6): No se hace nada para 'all-am'.
make(6): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos'
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/demos'
Making all in tune
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tune'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/tune'
Making all in doc
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/doc'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp/doc'
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/gmp'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr'
Making all in doc
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/doc'
make(4): No se hace nada para 'all'.
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/doc'
Making all in src
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/src'
make  all-am
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/src'
make(5): No se hace nada para 'all-am'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/src'
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/src'
Making all in tests
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/tests'
make(4): No se hace nada para 'all'.
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/tests'
Making all in tune
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/tune'
make(4): No se hace nada para 'all'.
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr/tune'
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr'
make(4): No se hace nada para 'all-am'.
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpfr'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
make  all-recursive
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
Making all in src
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/src'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/src'
Making all in tests
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/tests'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/tests'
Making all in doc
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/doc'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc/doc'
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/mpc'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
make  all-recursive
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
Making all in .
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
Making all in doc
make(5): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl/doc'
make(5): No se hace nada para 'all'.
make(5): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl/doc'
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/isl'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/libiberty'
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/libiberty/testsuite'
make(4): No se hace nada para 'all'.
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/libiberty/testsuite'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/libiberty'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/lto-plugin'
make  all-am
make(4): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/lto-plugin'
make(4): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/lto-plugin'
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/lto-plugin'
make(3): se entra en el directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/intl'
make(3): No se hace nada para 'all'.
make(3): se sale del directorio '/gcc12/gcc/host-x86_64-pc-linux-gnu/intl'
make(3): se entra en el directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libiberty'
make(4): se entra en el directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make(4): No se hace nada para 'all'.
make(4): se sale del directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make(3): se sale del directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libiberty'
make(3): se entra en el directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/fixincludes'
make(3): No se hace nada para 'all'.
make(3): se sale del directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/fixincludes'

Errores:

make(3): se entra en el directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libcpp'
g++ -std=c++11  -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include  -g -O2 -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti -I../.././libcpp -I. -I../.././libcpp/../include -I../.././libcpp/include    -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo ../.././libcpp/charset.c
cc1: warning: command-line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
cc1: warning: command-line option ‘-fno-rtti’ is valid for C++/D/ObjC++ but not for C
In file included from ../.././libcpp/include/cpplib.h:27,
                 from ../.././libcpp/charset.c:22:
../.././libcpp/include/line-map.h:330:3: error: expected specifier-qualifier-list before ‘static’
  330 |   static source_range from_location (location_t loc)
      |   ^~~~~~
../.././libcpp/include/line-map.h:403:43: error: expected identifier or ‘(’ before ‘:’ token
  403 | struct GTY((tag ("1"))) line_map_ordinary : public line_map {
      |                                           ^
../.././libcpp/include/line-map.h:448:2: warning: ISO C does not allow extra ‘;’ outside of a function (-Wpedantic)
  448 | };
      |  ^
../.././libcpp/include/line-map.h:461:40: error: expected identifier or ‘(’ before ‘:’ token
  461 | struct GTY((tag ("2"))) line_map_macro : public line_map {
      |                                        ^
../.././libcpp/include/line-map.h:539:2: warning: ISO C does not allow extra ‘;’ outside of a function (-Wpedantic)
  539 | };
      |  ^
../.././libcpp/include/line-map.h:585:23: error: unknown type name ‘line_map’
  585 | MAP_ORDINARY_P (const line_map *map)
      |                       ^~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MAP_ORDINARY_P’:
../.././libcpp/include/line-map.h:587:30: error: request for member ‘start_location’ in something not a structure or union
  587 |   return IS_ORDINARY_LOC (map->start_location);
      |                              ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:593:38: error: unknown type name ‘line_map’
  593 | linemap_macro_expansion_map_p (const line_map *);
      |                                      ^~~~~~~~
../.././libcpp/include/line-map.h:599:8: error: unknown type name ‘line_map_ordinary’
  599 | inline line_map_ordinary *
      |        ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:600:25: error: unknown type name ‘line_map’
  600 | linemap_check_ordinary (line_map *map)
      |                         ^~~~~~~~
../.././libcpp/include/line-map.h:610:14: error: unknown type name ‘line_map_ordinary’
  610 | inline const line_map_ordinary *
      |              ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:611:31: error: unknown type name ‘line_map’
  611 | linemap_check_ordinary (const line_map *map)
      |                               ^~~~~~~~
In file included from ../.././libcpp/charset.c:21:
../.././libcpp/include/line-map.h: In function ‘linemap_check_ordinary’:
../.././libcpp/system.h:404:50: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier (-Wpedantic)
  404 | #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
      |                                                  ^~~~~~~~~~~~
../.././libcpp/include/line-map.h:547:7: note: in expansion of macro ‘abort’
  547 |       abort ();                                       
      |       ^~~~~
../.././libcpp/include/line-map.h:613:3: note: in expansion of macro ‘linemap_assert’
  613 |   linemap_assert (MAP_ORDINARY_P (map));
      |   ^~~~~~~~~~~~~~
In file included from ../.././libcpp/include/cpplib.h:27,
                 from ../.././libcpp/charset.c:22:
../.././libcpp/include/line-map.h:614:17: error: unknown type name ‘line_map_ordinary’
  614 |   return (const line_map_ordinary *)map;
      |                 ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:620:8: error: unknown type name ‘line_map_macro’
  620 | inline line_map_macro *linemap_check_macro (line_map *map)
      |        ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:620:45: error: unknown type name ‘line_map’
  620 | inline line_map_macro *linemap_check_macro (line_map *map)
      |                                             ^~~~~~~~
../.././libcpp/include/line-map.h:629:14: error: unknown type name ‘line_map_macro’
  629 | inline const line_map_macro *
      |              ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:630:28: error: unknown type name ‘line_map’
  630 | linemap_check_macro (const line_map *map)
      |                            ^~~~~~~~
In file included from ../.././libcpp/charset.c:21:
../.././libcpp/include/line-map.h: In function ‘linemap_check_macro’:
../.././libcpp/system.h:404:50: warning: ISO C does not support ‘__FUNCTION__’ predefined identifier (-Wpedantic)
  404 | #define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
      |                                                  ^~~~~~~~~~~~
../.././libcpp/include/line-map.h:547:7: note: in expansion of macro ‘abort’
  547 |       abort ();                                       
      |       ^~~~~
../.././libcpp/include/line-map.h:632:3: note: in expansion of macro ‘linemap_assert’
  632 |   linemap_assert (!MAP_ORDINARY_P (map));
      |   ^~~~~~~~~~~~~~
In file included from ../.././libcpp/include/cpplib.h:27,
                 from ../.././libcpp/charset.c:22:
../.././libcpp/include/line-map.h:633:17: error: unknown type name ‘line_map_macro’
  633 |   return (const line_map_macro *)map;
      |                 ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:639:27: error: unknown type name ‘line_map’
  639 | MAP_START_LOCATION (const line_map *map)
      |                           ^~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MAP_START_LOCATION’:
../.././libcpp/include/line-map.h:641:13: error: request for member ‘start_location’ in something not a structure or union
  641 |   return map->start_location;
      |             ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:647:42: error: unknown type name ‘line_map_ordinary’
  647 | ORDINARY_MAP_STARTING_LINE_NUMBER (const line_map_ordinary *ord_map)
      |                                          ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘ORDINARY_MAP_STARTING_LINE_NUMBER’:
../.././libcpp/include/line-map.h:649:17: error: request for member ‘to_line’ in something not a structure or union
  649 |   return ord_map->to_line;
      |                 ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:658:40: error: unknown type name ‘line_map_ordinary’
  658 | ORDINARY_MAP_IN_SYSTEM_HEADER_P (const line_map_ordinary *ord_map)
      |                                        ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘ORDINARY_MAP_IN_SYSTEM_HEADER_P’:
../.././libcpp/include/line-map.h:660:17: error: request for member ‘sysp’ in something not a structure or union
  660 |   return ord_map->sysp;
      |                 ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:666:21: error: unknown type name ‘line_map’
  666 | MAP_MODULE_P (const line_map *map)
      |                     ^~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MAP_MODULE_P’:
../.././libcpp/include/line-map.h:669:42: error: request for member ‘reason’ in something not a structure or union
  669 |           && linemap_check_ordinary (map)->reason == LC_MODULE);
      |                                          ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:675:31: error: unknown type name ‘line_map_ordinary’
  675 | ORDINARY_MAP_FILE_NAME (const line_map_ordinary *ord_map)
      |                               ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘ORDINARY_MAP_FILE_NAME’:
../.././libcpp/include/line-map.h:677:17: error: request for member ‘to_file’ in something not a structure or union
  677 |   return ord_map->to_file;
      |                 ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:682:8: error: unknown type name ‘cpp_hashnode’
  682 | inline cpp_hashnode *
      |        ^~~~~~~~~~~~
../.././libcpp/include/line-map.h:683:24: error: unknown type name ‘line_map_macro’
  683 | MACRO_MAP_MACRO (const line_map_macro *macro_map)
      |                        ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MACRO_MAP_MACRO’:
../.././libcpp/include/line-map.h:685:19: error: request for member ‘macro’ in something not a structure or union
  685 |   return macro_map->macro;
      |                   ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:692:35: error: unknown type name ‘line_map_macro’
  692 | MACRO_MAP_NUM_MACRO_TOKENS (const line_map_macro *macro_map)
      |                                   ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MACRO_MAP_NUM_MACRO_TOKENS’:
../.././libcpp/include/line-map.h:694:19: error: request for member ‘n_tokens’ in something not a structure or union
  694 |   return macro_map->n_tokens;
      |                   ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:701:28: error: unknown type name ‘line_map_macro’
  701 | MACRO_MAP_LOCATIONS (const line_map_macro *macro_map)
      |                            ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MACRO_MAP_LOCATIONS’:
../.././libcpp/include/line-map.h:703:19: error: request for member ‘macro_locations’ in something not a structure or union
  703 |   return macro_map->macro_locations;
      |                   ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:709:43: error: unknown type name ‘line_map_macro’
  709 | MACRO_MAP_EXPANSION_POINT_LOCATION (const line_map_macro *macro_map)
      |                                           ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘MACRO_MAP_EXPANSION_POINT_LOCATION’:
../.././libcpp/include/line-map.h:711:19: error: request for member ‘expansion’ in something not a structure or union
  711 |   return macro_map->expansion;
      |                   ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:725:3: error: unknown type name ‘line_map_ordinary’
  725 |   line_map_ordinary * GTY ((length ("%h.used"))) maps;
      |   ^~~~~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:734:3: error: expected specifier-qualifier-list before ‘mutable’
  734 |   mutable unsigned int cache;
      |   ^~~~~~~
../.././libcpp/include/line-map.h:740:3: error: unknown type name ‘line_map_macro’
  740 |   line_map_macro * GTY ((length ("%h.used"))) maps;
      |   ^~~~~~~~~~~~~~
../.././libcpp/include/line-map.h:749:3: error: expected specifier-qualifier-list before ‘mutable’
  749 |   mutable unsigned int cache;
      |   ^~~~~~~
../.././libcpp/include/line-map.h:756:3: error: unknown type name ‘source_range’
  756 |   source_range src_range;
      |   ^~~~~~~~~~~~
../.././libcpp/include/line-map.h:780:1: error: unknown type name ‘class’
  780 | class GTY(()) line_maps {
      | ^~~~~
../.././libcpp/include/line-map.h:780:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
  780 | class GTY(()) line_maps {
      |                         ^
../.././libcpp/include/line-map.h:826:2: warning: ISO C does not allow extra ‘;’ outside of a function (-Wpedantic)
  826 | };
      |  ^
../.././libcpp/include/line-map.h:831:27: error: unknown type name ‘line_maps’
  831 | LINEMAPS_ALLOCATED (const line_maps *set, bool map_kind)
      |                           ^~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘LINEMAPS_ALLOCATED’:
../.././libcpp/include/line-map.h:834:15: error: request for member ‘info_macro’ in something not a structure or union
  834 |     return set->info_macro.allocated;
      |               ^~
../.././libcpp/include/line-map.h:836:15: error: request for member ‘info_ordinary’ in something not a structure or union
  836 |     return set->info_ordinary.allocated;
      |               ^~
../.././libcpp/include/line-map.h: At top level:
../.././libcpp/include/line-map.h:841:21: error: expected identifier or ‘(’ before ‘&’ token
  841 | inline unsigned int &
      |                     ^
../.././libcpp/include/line-map.h:853:22: error: unknown type name ‘line_maps’
  853 | LINEMAPS_USED (const line_maps *set, bool map_kind)
      |                      ^~~~~~~~~
../.././libcpp/include/line-map.h: In function ‘LINEMAPS_USED’:
../.././libcpp/include/line-map.h:856:15: error: request for member ‘info_macro’ in something not a structure or union
  856 |     return set->info_macro.used;
      |               ^~
../.././libcpp/include/line-map.h:858:15: error: request for member ‘info_ordinary’ in something not a structure or union
  858 |     return set->info_ordinary.used;

Final:

make(3): *** (Makefile:226: charset.o) Error 1
make(3): se sale del directorio '/gcc12/gcc/build-x86_64-pc-linux-gnu/libcpp'
make(2): *** (Makefile:2955: all-build-libcpp) Error 2
make(2): se sale del directorio '/gcc12/gcc'
make(1): *** (Makefile:29328: stage1-bubble) Error 2
make(1): se sale del directorio '/gcc12/gcc'
make: *** (Makefile:1008: all) Error 2

¿Esto cómo se soluciona? De no poderse solucionar los 500 errores (aquí se muestran aproximadamente 100), al menos, ¿Cómo soluciono el primer error, o alguno de ellos?