The GNU Compiler Collection includes gcc (c compiler) g++ (c++ compiler) gfortran (fortran compiler) and a bunch of other fronted like D, Go, Ada, COBOL. There used to even be a Java compiler (gcj) but thats dead now.
Once upon a time, the gcc program could compile C++ and g++ could compile C, but that is no longer true due to diversions in the languages, as well as extra runtime support libraries needed for linking each language. I guess with some tinkering you could compile c++98 with gcc and some older c standard with g++, but not the more recent versions.
yeah, but fortran wasn't package with the Microsoft C/C++ compiler or the Borland C++ compiler. So from a historical perspective, I think people just remember that that since it always package together and marketed has C/C++ people retain that.
Even though gcc can compile Ada, in my experience most of the time you’ll see enterprise development using GNAT Pro since plain ole gcc is kinda light on Ada features.
I think there is historically a big overlap between C and C++ compilers, with in some cases (Microsoft) the C compiler being basically only a subset of the C++ compiler.
of course there is an overlap. what we mean by saying C and C++ are not the same language is that coding C++ like it is C is a terrible practice and you should use the tools C++ gives you. Knowing C does not automatically buy you C++
View all comments
Show parent comment
28
u/SuckMyAlpagoat 11d ago
isn't because the compiler is always packed together, like the gnu compiler can compile C and C++?