man gcc, gcc supports the following languages, which you can choose from with the
c c-header cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input go java
What is the criteria for putting a language in gcc? Obviously languages like C and C++ are going to be in gcc, but I was surprised at go and java.
Additionally, the gcc documentation at gnu.org says: "The language-independent component of GCC includes the majority of the optimizers, as well as the “back ends” that generate machine code for various processors." My knowledge on compilers is basic at best, but does this mean that gcc parses and lexes each language into some kind of universal format and then produces some kind of binary from there? If this is the case, would writing a gcc optimizer that is language-independent work for any of those languages, for example both C and go?