+2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c/19315
+ * c-decl.c (finish_decl): Don't add the 'extern' storage class to
+ objects of unknown size.
+
2018-08-13 Martin Sebor <msebor@redhat.com>
PR tree-optimization/71625
case 2:
if (do_default)
error ("array size missing in %q+D", decl);
- /* If a `static' var's size isn't known,
- make it extern as well as static, so it does not get
- allocated.
- If it is not `static', then do not mark extern;
- finish_incomplete_decl will give it a default size
- and it will get allocated. */
- else if (!pedantic && TREE_STATIC (decl) && !TREE_PUBLIC (decl))
- DECL_EXTERNAL (decl) = 1;
break;
case 3:
+2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR c/19315
+ * gcc.dg/graphite/pr82451.c: Make array 'a' an extern.
+ * gcc.dg/redecl-10.c: Expect warnings for the static vars with
+ unknown size.
+
2018-08-15 Martin Liska <mliska@suse.cz>
PR tree-optimization/86925
/* { dg-do compile } */
/* { dg-options "-O -floop-parallelize-all" } */
-static int a[];
+extern int a[];
int b[1];
int c;
static void
/* { dg-do compile } */
/* { dg-options "-g" } */
-static int w[];
+static int w[]; /* { dg-warning "array 'w' assumed to have one element" } */
void
f (void)
{
extern int x[] = { 3, 4, 5 }; /* { dg-error "has both" } */
}
-static int y[];
+static int y[]; /* { dg-warning "array 'y' assumed to have one element" } */
void
h (void)
{