Revert "Revert "Fixing aliasing violations, C++ 11, and gcc 4.7 changes from linaro.""

This reverts commit 486e6f6d7e80f524da5e21344e1720c6f7a861e8.