Commit 4cdf7223 by Paul Brook Committed by Paul Brook

gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.

	* 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
parent fa151acf
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,
......
......@@ -469,9 +469,11 @@ typedef struct gfc_linebuf
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;
......
......@@ -1034,7 +1034,7 @@ load_file (char *filename, bool initial)
/* 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment