UPDATE: As of November 5, 2012, MinGW includes 4.7.2 the GCC compiler, which is the latest version. I will personally use the MinGW package, as it includes MSYS and other tools, and since it is a defacto standard, I hope it is better supported. The only drawback is the included GDB does not include Python scripts, but I think they can be updated separately.
I don't know if you can upgrade GCC to MinGW, but there are alternative MinGW projects with newer versions of GCC.
The MinGW-builds project provides a package similar to MinGW, but with updated GCC (4.7.2). I extracted the files in c: \ MinGW (so that I can use the same path) after moving my existing MinGW to another folder. Only MinGW has MSYS , so if you need (s), copy the msys folder from the original MinGW.
After installing MinGW-builds, the result is g ++ -version:
g++ (Built by MinGW-builds project) 4.7.2
The latest GCC, which comes standard with MinGW, is currently 4.7.0. I put together some simple projects in Code :: Blocks and the latest source of wxWidgets, and everything seems to work.
It's worth noting that MinGW-builds includes a version of GDB with Python script support if you need printer support with STL support or other Python GDB features.
Another good choice is TDM-GCC , which is a project that hosts an impressive installer that includes an updated GCC compiler (4.7.1) and support tools. This is a standalone package. As far as I can tell, Python scripts are not supported in the GDB that comes with this package.
Finally, there is the MinGW-w64 project , which is the MinGW plug. Rubenvb, which posted the answer to this question, has good standalone packages (in the personal assemblies folder) based on this project, which includes the updated GCC (4.7.2). The included GDB seems to have included a Python script.