+2016-07-29 Marek Polacek <polacek@redhat.com>
+
+ PR c/71742
+ * c-decl.c (finish_struct): Rephrase an error message.
+
2016-07-29 Jakub Jelinek <jakub@redhat.com>
PR c/71969
else if (!saw_named_field)
{
error_at (DECL_SOURCE_LOCATION (x),
- "flexible array member in otherwise empty struct");
+ "flexible array member in a struct with no named "
+ "members");
TREE_TYPE (x) = error_mark_node;
}
}
+2016-07-29 Marek Polacek <polacek@redhat.com>
+
+ PR c/71742
+ * gcc.dg/940510-1.c: Adjust dg-error.
+ * gcc.dg/c99-flex-array-1.c: Likewise.
+ * gcc.dg/c99-flex-array-typedef-1.c: Likewise.
+
2016-07-29 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/pr59833.c: Use dg-add-options ieee.
/* { dg-do compile } */
/* { dg-options "-std=c89 -pedantic" } */
struct { int a[]; } x = { 0 }; /* { dg-warning "ISO C90 does not support flexible array members" } */
-/* { dg-error "flexible array member in otherwise empty struct" "" { target *-*-* } 3 } */
+/* { dg-error "flexible array member in a struct with no named members" "" { target *-*-* } 3 } */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
-struct s1 { int x[]; }; /* { dg-error "empty struct" "empty" } */
-struct s2 { int :1; int x[]; }; /* { dg-error "empty struct" "empty" } */
+struct s1 { int x[]; }; /* { dg-error "no named members" "members" } */
+struct s2 { int :1; int x[]; }; /* { dg-error "no named members" "members" } */
struct s3 { int x[]; int y; }; /* { dg-error "not at end" "not at end" } */
struct s4 { int x; int y[]; };
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
typedef int A[];
-struct s1 { A x; }; /* { dg-error "empty struct" "empty" } */
-struct s2 { int :1; A x; }; /* { dg-error "empty struct" "empty" } */
+struct s1 { A x; }; /* { dg-error "no named members" "members" } */
+struct s2 { int :1; A x; }; /* { dg-error "no named members" "members" } */
struct s3 { A x; int y; }; /* { dg-error "not at end" "not at end" } */
struct s4 { int x; A y; };