Since
r10-6527-gaaa26bf496a646778ac861aed124d960b5bf549f fold_for_warn
will perform maybe_constant_value even on some cp_fold produced trees and
so can include rotate exprs which were removed last fall from constexpr.c
2020-03-09 Jakub Jelinek <jakub@redhat.com>
PR c++/94067
Revert
2019-10-11 Paolo Carlini <paolo.carlini@oracle.com>
* constexpr.c (cxx_eval_constant_expression): Do not handle
RROTATE_EXPR and LROTATE_EXPR.
* g++.dg/warn/Wconversion-pr94067.C: New test.
+2020-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/94067
+ Revert
+ 2019-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * constexpr.c (cxx_eval_constant_expression): Do not handle
+ RROTATE_EXPR and LROTATE_EXPR.
+
2020-03-09 Marek Polacek <polacek@redhat.com>
PR c++/94050 - ABI issue with alignas on armv7hl.
case MAX_EXPR:
case LSHIFT_EXPR:
case RSHIFT_EXPR:
+ case LROTATE_EXPR:
+ case RROTATE_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
case MAX_EXPR:
case LSHIFT_EXPR:
case RSHIFT_EXPR:
+ case LROTATE_EXPR:
+ case RROTATE_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
+2020-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/94067
+ * g++.dg/warn/Wconversion-pr94067.C: New test.
+
2020-03-09 Marek Polacek <polacek@redhat.com>
PR c++/94050 - ABI issue with alignas on armv7hl.
--- /dev/null
+// PR c++/94067
+// { dg-do compile }
+// { dg-options "-Wconversion" }
+
+static inline unsigned short
+swap (unsigned short x)
+{
+ return (x >> 8) | static_cast<unsigned short>(x << 8);
+}