Open Code blocks and go to the Toolbar, then select Project, then Build Options. At the top you should see Selected Compiler, it should say GNU GCC Compiler, click that and then select what you want. I have never done this but hopefully it will work for you.