GCC Compiler Suite
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system.
The GNU system was developed to be 100% free software...free in the sense that it respects the user's freedom.
Choosing a version
The can check the version of GCC with this command:
We maintain several versions via the module command. To see which other versions are available:
module avail gcc
You can switch to one of these versions by loading it:
module load gcc/x.y
Basic source code compilation usage is as follows:
gcc hello.c -o hello
gfortran hello.f90 -o hello
g++ hello.cpp -o hello
Useful Compilation Options
Display all warnings during compilation
Compile at higher optimization level
Enable debug symbols in executable (required for debuggers)
Cause the program to abort on signed integer overflow (formally "undefined behaviour" in C).
See the official website: GNU Compiler Collection