PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
* c-warn.c (check_address_or_pointer_of_packed_member): Check the type
of RHS.
* g++.dg/warn/Waddress-of-packed-member2.C: New test.
From-SVN: r270166
+2019-04-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
+ * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
+ of RHS.
+
2019-04-03 Jason Merrill <jason@redhat.com>
PR c++/86586 - -fcompare-debug=-Wsign-compare.
rhs = TREE_TYPE (rhs); /* Pointer type. */
rhs = TREE_TYPE (rhs); /* Function type. */
rhstype = TREE_TYPE (rhs);
- if (!POINTER_TYPE_P (rhstype))
+ if (!rhstype || !POINTER_TYPE_P (rhstype))
return NULL_TREE;
rvalue = true;
}
+2019-04-05 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
+ * g++.dg/warn/Waddress-of-packed-member2.C: New test.
+
2019-04-05 Richard Biener <rguenther@suse.de>
PR debug/89892
--- /dev/null
+// PR c++/89973
+// { dg-do compile { target c++14 } }
+
+constexpr int a(); // { dg-warning "used but never defined" }
+
+template <typename>
+constexpr void *b = a(); // { dg-error "invalid conversion" }