+2017-06-04 Marek Polacek <polacek@redhat.com>
+
+ PR c/80919
+ * c-format.c (matching_type_p): Return false if any of the types
+ requires structural equality.
+
2017-06-02 Martin Sebor <msebor@redhat.com>
PR c/80892
gcc_assert (spec_type);
gcc_assert (arg_type);
+ /* If any of the types requires structural equality, we can't compare
+ their canonical types. */
+ if (TYPE_STRUCTURAL_EQUALITY_P (spec_type)
+ || TYPE_STRUCTURAL_EQUALITY_P (arg_type))
+ return false;
+
spec_type = TYPE_CANONICAL (spec_type);
arg_type = TYPE_CANONICAL (arg_type);
+2017-06-04 Marek Polacek <polacek@redhat.com>
+
+ PR c/80919
+ * gcc.dg/format/pr80919.c: New test.
+
2017-06-02 Martin Sebor <msebor@redhat.com>
PR c/80892
--- /dev/null
+/* PR c/80919 */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+void
+fn (void)
+{
+ int a[0];
+ __builtin_printf("%d\n", &a); /* { dg-warning "expects argument of type" } */
+ __builtin_printf("%i\n", &a); /* { dg-warning "expects argument of type" } */
+
+ __builtin_printf("%o\n", &a); /* { dg-warning "expects argument of type" } */
+ __builtin_printf("%u\n", &a); /* { dg-warning "expects argument of type" } */
+ __builtin_printf("%x\n", &a); /* { dg-warning "expects argument of type" } */
+ __builtin_printf("%X\n", &a); /* { dg-warning "expects argument of type" } */
+}