What are the GCC and clang versions available in Ubuntu 18.04? [duplicate]

In the new Ubuntu 18.04:

  • What's the default GCC version (with which the binaries were built)?
  • What GCC versions are available as separate packages (and what minor version is installed if I install GCC 4, 5, 6, 7 or 8 respectively)?
  • What Clang versions are available as separate packages (and what minor version is installed if I install clang 4 or 5?)

I can't find this in any release notes (and I don't want to have to install just to check.)


Solution 1:

Thanks to the commenters, I checked Ubuntu's package server:

  • Default compiler: GCC 7.4.0
  • Can install: GCC 4.8.5, GCC 5.5.0
  • Can install from the "universe" repositories: GCC 6.4.0, GCC 8 (version string 20180414, not quite sure what that means)
  • Can install: clang 6.0 (default version), clang 3.9.1, clang 4.0.1, clang 5.0.1

If you add the toolchain-r PPA, you can also install GCC 8.1.0.