Port on gcc 4.6