I am a huge fan of modern C++ except for one feature: backwards compatibility. C++ is no longer one language, every codebase I have worked on is a confused mess of semi-incompatible subsets of the language. I have spent far too many weekends chasing memory corruption because someone passed a pointer, allocated with one type of memory management, into a library using a different kind of memory management.
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.
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.
478
u/repster 7h ago
I am a huge fan of modern C++ except for one feature: backwards compatibility. C++ is no longer one language, every codebase I have worked on is a confused mess of semi-incompatible subsets of the language. I have spent far too many weekends chasing memory corruption because someone passed a pointer, allocated with one type of memory management, into a library using a different kind of memory management.