]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/constexpr.c
* constexpr.c (cxx_eval_check_shift_p): New function.
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2014 17:23:34 +0000 (17:23 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Dec 2014 17:23:34 +0000 (17:23 +0000)
commit2b035ffed1b1e4d778811ff85b3f4c35c62cc1ec
tree03e39b9b966b035070baec1018ed17c536b705a9
parent324da92d45b1b704e39ff8802924f16c2ef6cb3f
* constexpr.c (cxx_eval_check_shift_p): New function.
(cxx_eval_binary_expression): Call it.  Set NON_CONSTANT_P if it
returns true.

* g++.dg/cpp0x/constexpr-shift1.C: New test.
* g++.dg/cpp1y/constexpr-shift1.C: New test.
* g++.dg/ubsan/pr63956.C: Add dg-errors.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218279 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-shift1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/constexpr-shift1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ubsan/pr63956.C