While gcc 7.3 is the default on Ubuntu, gcc 8.1 is available. To use 8.1 put the following in your .bashrc file or otherwise set the variable CC = gcc-8:
This will cause gcc-8 to automatically be used by most compile scripts.
There are those who say 8.1 is still experimental, this may be but I compiled apache with it and it has been running stable for months. Apache is a pretty good compiler stress test.
The code that gcc-8 generates is significantly smaller and faster than gcc 7.3 which is the default.
At present this is available on ubuntu.eskimo.com only.