MDPSim code for gcc 4.0+