...
user@host $ scl enable devtoolset-4 bash
bash-4.1$ gcc --version
gcc (GCC) 5.2.1 20150902 (Red Hat 5.2.1-2)
bash-4.1$ exitksa@iris02 $ scl enable devtoolset-4 'gcc --version'
gcc (GCC) 5.2.1 20150902 (Red Hat 5.2.1-2)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
How to install Developer Toolset / Software Collections on CentOS 7:
$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-6
$ scl enable devtoolset-6 'gcc --version | head -1'gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-3)
The Red Hat Developer Toolset (DTS) is intended to give developers access to updated compilers and tools for C and C++ development.
...