If you install macports you can install gcc select, and then choose your gcc version.
/opt/local/bin/port install gcc_select
To see your versions use
port select --list gcc
To select a version use
sudo port select --set gcc gcc40
More Related Contents:
- How to create a static library with g++?
- Undefined reference to vtable
- What is the difference between g++ and gcc?
- How does #include work in C++? [duplicate]
- Compiling a C++ program with GCC
- Why does typeid.name() return weird characters using GCC and how to make it print unmangled names?
- What is the purpose of using -pedantic in the GCC/G++ compiler?
- 😃 (and other Unicode characters) in identifiers not allowed by g++
- constexpr initializing static member using static function
- How to tell where a header file is included from?
- How to include omp.h in OS X?
- Linking g++ 4.8 to libstdc++
- OSX – replace gcc version 4.2.1 with 4.9 installed via Homebrew
- Linking to MSVC DLL from MinGW
- Compiling with g++ using multiple cores
- GNU C++ how to check when -std=c++0x is in effect?
- SetJmp/LongJmp: Why is this throwing a segfault?
- request for member `…’ is ambiguous in g++
- Why include guards?
- Template instantiation details of GCC and MS compilers
- GCC: Difference between -O3 and -Os
- Why “initializer-string for array of chars is too long” compiles fine in C & not in C++?
- Using bts assembly instruction with gcc compiler
- Does the restrict keyword provide significant benefits in gcc/g++?
- Install gcc on linux with no root privilege
- Default libraries linked in by gcc?
- Fun with uninitialized variables and compiler (GCC)
- Undocumented GCC Extension: VLA in struct
- How should I use g++’s -finput-charset compiler option correctly in order to compile a non-UTF-8 source file?
- List of common C++ Optimization Techniques [closed]