* gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
(gfc_linebuf_header_size): Define.
* scanner.c (load_file): Use it.
From-SVN: r87655
+2004-09-17 Paul Brook <paul@codesourcery.com>
+
+ * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
+ (gfc_linebuf_header_size): Define.
+ * scanner.c (load_file): Use it.
+
2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
* array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
struct gfc_file *file;
struct gfc_linebuf *next;
- char line[];
+ char line[1];
} gfc_linebuf;
-
+
+#define gfc_linebuf_header_size (offsetof (gfc_linebuf, line))
+
typedef struct
{
char *nextc;
/* Add line. */
- b = gfc_getmem (sizeof (gfc_linebuf) + len + 1);
+ b = gfc_getmem (gfc_linebuf_header_size + len + 1);
#ifdef USE_MAPPED_LOCATION
b->location