Exporting from Mbed
The mbed documentation clearly states that GCC version 4.9 is required; 5.x versions “are likely to cause compile issues and should not be used”.
https://github.com/ARMmbed/mbed-cli#through-mbed_settingspy
https://developer.mbed.org/teams/MultiTech/wiki/Using-Eclipse-and-mbed-5-for-MTS-Devices
See also: http://www.openstm32.org/tiki-view_forum_thread.php?forumId=7&comments_parentId=5150