GNU Compiler Collection

From ArchWiki

The GNU Compiler Collection (GCC) is part of the GNU toolchain and includes front ends for C and C++.

Installation

Install the gcc package.

Other available front-ends are:

Old versions

Old versions of GCC are available via the official repositories and the AUR and may be useful for historical curiosity, old projects that cannot be compiled on the current versions, or for testing the compatibility of projects:

Other front-ends for old versions of GCC may be found on the official repositories and the AUR by searching for gcc<version without period>, e.g. searching for gcc9 for GCC 9 front-ends.

Tip: Use the CC (for C)[1] and CXX (for C++)[2] environment variables to specify which version of GCC will be used with e.g make or cmake. For example:
$ export CC=gcc-11 CXX=g++-11

See also