Notes on using gcc 5.1.0 on CAEN - Fall 2015

The gcc 5.1.0 release includes substantial C++14 support in the compiler and library. It will be used by the autograder for the C++ projects in the course.

CAEN's standard environment currently has gcc 4.x as the default. To get access to gcc 5.1.0, issue the command:

module load gcc/5.1.0

This makes your default gcc to be gcc 5.1.0 for the duration of your login. You can also put this command in your login initialization files if you want.

Compile using g++ as usual, but include the option to select the c++14 dialect. For example:

g++ -std=c++14 test.cpp


As of Oct. 2015, using Valgrind with gcc 5.1.0 has a problem.  There is an unresolved deep implementation issue in gcc 5.1.0 that causes Valgrind to produce a warning at program termination that is not the fault of your code.

Note: Even though the autograder is using gcc 5.1.0, it does not test for this problem, so project scoring will not be affected.

Two approaches:

1. If you use Valgrind with gcc 5.1.0 and get a final message that looks like this:

==3340== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1

==3340==    at 0x4C29BFD: malloc (in /usr/lib64/valgrind/

==3340==    by 0x4EBE17F: pool (

==3340==    by 0x4EBE17F: __static_initialization_and_destruction_0 (

==3340==    by 0x4EBE17F: (

==3340==    by 0x400F4E2: _dl_init (in /usr/lib64/

==3340==    by 0x4001459: ??? (in /usr/lib64/

Then it is safe to ignore the message at this time. 

2. Alternatively, since CAEN’s default gcc 4.8.3 with C++11 almost certainly covers everything required in the course,  you can try building your project with gcc 4.8.3 with C++11 and test it with Valgrind. If no problems, you can assume that your memory handling is OK.