check gcc version

C++
gcc -v
Source

Also in C++: