about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.cc
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-19 19:52:08 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-20 11:25:20 +0100
commit19fef72a8c14100029e5ce39cbc5472ab091dad8 (patch)
tree181c5cefa6c8a3b456ed8a5be8005c091237935d /src/test/codegen/stack-alloc-string-slice.cc
parent7f53b943f94b338e4c5401f1ce9efbe7da92b0c5 (diff)
downloadrust-19fef72a8c14100029e5ce39cbc5472ab091dad8.tar.gz
rust-19fef72a8c14100029e5ce39cbc5472ab091dad8.zip
Added panic-on-overflow for rhs of left and right shift expressions.
This includes a slight refactoring of the `cast_shift_rhs` and related
functions in `trans::base`, so that I can call them from much later in
the compiler's control flow (so that we can clearly dilineate where
automatic conversions of the RHS occur, versus where we check it).

The rhs-checking and fallback-masking is generalized to 8- and 16-bit
values, and the fallback-masking is turned on unconditionally.

Fix #10183.

Is this a [breaking-change]?  I would argue it is not; it only adds a
strict definition to what was previously undefined behavior; however,
there might be code that was e.g. assuming that `1_i8 << 17` yields 0.
(This happens in certain contexts and at certain optimization levels.)
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.cc')
0 files changed, 0 insertions, 0 deletions