This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Left shift of negative value
- From: Andrew Haley <aph at redhat dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 1 Dec 2015 16:07:18 +0000
- Subject: Left shift of negative value
- Authentication-results: sourceware.org; auth=none
Do we support left shift of a negative value? Technically it's
undefined and ubsan warns about it. However, a ton of software would
surely break if we didn't do the obvious right thing. I can't find
anything in the GCC manual.
Thanks,
Andrew.