Be aware!:
two compilers with different version on one system is not a good idea. Especially mingw, because of his hard coded paths (i don't know if they are fixed now)... I woul recommend you to use one compiler in a vm, or at least keep your PATH in sync with the compiler you are using (delete the other compiler from the PATH variable)
And do not install any of these compilers in "\MinGW" on any disk, at least not if you want/need to install multiple versions on one system.
That works pretty well if you have recent versions (and reasonable builds).
I have both MinGW (4.8.1) and MSYS installed on
C:\, LLVM (the Visual Studio overload) in
C:\Programs (x86)\LLVM, and
mingw-w64-4.9.2-w32, mingw-w64-4.9.2-w64, tdm-4.9.2-w32, and tdm-4.9.2-w64 side by side in
D:\buildtools.
Code::Blocks works with any of these.
Only issues are that
a) LLVM seriously sucks because it is incapable of exception handling and borrows that functionality with some obscure hack that I do not quite understand fully from the first compiler install that it finds in
PATH. Which happens to be... not precisely a rock solid solution especially if you regularly update compilers and have multilib compilers among your set of compilers. In particular, if you use exceptions with 64bit code on my machine, LLVM will borrow TDM's multilib version to throw SJLJ 32-bit exceptions which fails with missing symbols.
b) The compiler management in Code::Blocks isn't really meant to be used with half a dozen versions of the same compiler at the same time and divine the correct version for every case without user interaction. It certainly works as designed, but not always as wanted (without manually changing project options). Admittedly, it would be hard to implement something much better, too.