MATLAB: Doesn’t Matlab support newer gcc versions

compilergccgcc 4.7linuxMATLABmex

Now that the C++11 standard is out, it would be nice to use its features directly when creating mex-files. However, even the latest Matlab R2012b only supports gcc 4.4, which does not have much of C++11 support in it. What are the principles by which the supported compiler is chosen for each version?
I am aware that I can separate the C++11 code into a dynamically-loaded library, and only use the gcc-4.4 code to redirect calls into that library. What I'm wondering though is why Mathworks did not update their compiler support to gcc-4.7, or at least gcc-4.6, straight-away with the 2012 releases?

Best Answer

Kaba, MathWorks chooses its MEX compiler support based on a number a factors. Primary among those is platform support. MathWorks has in fact experimented with more modern versions of GCC, but doing so introduces binary incompatibility with older supported Linux distributions, most notable Red Hat Enterprise Linux 5. This distribution is beginning to show its age, but it is an important platform to support. So, MathWorks is sticking with version 4.4. for now.
Your chart above (nice!) show a fairly consistent 1.5-2 year upgrade cycle, and without making any promises, I expect MathWorks to continue with this general pattern.
Related Question