This question already has an answer here:
I am trying to update
gcc version in debian pc, but no luck yet.
I have followed the instruction given in this answer and changed the last command to
apt-get install gcc-5.4 g++-5.4 but it seems no installable package is available for latest gcc verion. Even
aptitude search gcc-5 does not list anything.
EDIT : Adding output of
PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"