@@ -1954,6 +1954,11 @@ cxx_omp_disregard_value_expr (tree decl, bool shared)
tree
cp_fully_fold (tree x)
{
+ if (processing_template_decl)
+ return x;
+ /* FIXME cp_fold ought to be a superset of maybe_constant_value so we don't
+ have to call both. */
+ x = maybe_constant_value (x);
return cp_fold (x);
}
new file mode 100644
@@ -0,0 +1,15 @@
+// PR c++/71121
+// { dg-do compile { target c++14 } }
+// { dg-options -Waddress }
+
+struct CC { void mbr(); };
+
+constexpr auto getFunc() {
+ return &CC::mbr;
+}
+
+constexpr bool xxx(void (CC::*_a)())
+{
+ constexpr auto f = getFunc();
+ return (f == _a);
+}
deleted file mode 100644
@@ -1,17 +0,0 @@
-// PR c/62096 - unexpected warning overflow in implicit constant conversion
-// { dg-do compile { target c++11 } }
-
-enum E {
- E_val = 1,
-};
-
-inline constexpr E operator~(E e)
-{
- return E(~static_cast<int>(e));
-}
-
-int main()
-{
- int val = ~E_val; // { dg-bogus "overflow in implicit constant conversion" }
- (void) val;
-}