I had installed gcc on Mac High Sierra(as its needed for some software that I need to use). I was asked to check if my gcc was updated, in order to install the said software. Upon some searching, I found this command to find it -
gcc -dumpversion | cut -f1,2,3 -d.
This gives the output as 4.2.1.
When I try to run brew install gcc, it however says -
Error: gcc 8.2.0 is already installed To upgrade to 8.3.0, run
brew upgrade gcc
I don't understand why these two commands give different versions of gcc installed, and which of the two could actually be getting used while I am trying to install the software. Any help would be appreciated!