% brew install gcc
% g++ -v
- この時点ではXcodeでインストールされたClangのversionが表示される
% ls /usr/local/bin | grep gcc
% ls /usr/local/bin | grep g++
- homebrewでインストールしたgccのversionがわかる
% ln -s /usr/local/bin/gcc-10 /usr/local/bin/gcc
% ln -s /usr/local/bin/g++-10 /usr/local/bin/g++
% export PATH=$PATH:/usr/local/bin
- now gcc via homebrew is called prior to Clang