]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid signed left shift undefined behaviour in sext_hwi
authormikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Aug 2015 13:42:36 +0000 (13:42 +0000)
committermikael <mikael@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Aug 2015 13:42:36 +0000 (13:42 +0000)
commit3994684014cd678479f0220e2f5abbc018aeb064
tree7fc210dbbfce746c7c7751a31a39af13ad6a75b5
parenta734d75772136e61cb4424c02bed8e1e485a72fa
Avoid signed left shift undefined behaviour in sext_hwi

gcc/
PR other/67042
* hwint.h (sext_hwi): Switch to unsigned for the left shift, and
conditionalize the whole on __GNUC__.  Add fallback code
depending neither on undefined nor implementation-defined behaviour.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227008 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/hwint.h