summaryrefslogtreecommitdiff
path: root/libgfortran/io
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-11 07:15:00 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-11 07:15:00 +0000
commit516f3c65d2ab66f3e8bd801c5c6dc8489eaa1855 (patch)
treea0cd60416dab643f320b8a0a0c5061507bc382c7 /libgfortran/io
parente27ef4689fd2b241e7b9cefd0e69cf923fbf148a (diff)
downloadgcc-516f3c65d2ab66f3e8bd801c5c6dc8489eaa1855.tar.gz
* io/io.h (st_parameter_dt): Revert 2005-12-10 change to
u.pad, fix comment. (check_st_parameter_dt): New compile time assert. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112850 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r--libgfortran/io/io.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h
index b829ad44005..cfb94019633 100644
--- a/libgfortran/io/io.h
+++ b/libgfortran/io/io.h
@@ -436,13 +436,19 @@ typedef struct st_parameter_dt
char value[32];
gfc_offset size_used;
} p;
- /* This pad size must be greater than or equal to the pad_size declared in
- trans-io.c (gfc_build_io_library_fndecls) */
- char pad[16 * sizeof (char *) + 34 * sizeof (int)];
+ /* This pad size must be equal to the pad_size declared in
+ trans-io.c (gfc_build_io_library_fndecls). The above structure
+ must be smaller or equal to this array. */
+ char pad[16 * sizeof (char *) + 32 * sizeof (int)];
} u;
}
st_parameter_dt;
+/* Ensure st_parameter_dt's u.pad is bigger or equal to u.p. */
+extern char check_st_parameter_dt[sizeof (((st_parameter_dt *) 0)->u.pad)
+ >= sizeof (((st_parameter_dt *) 0)->u.p)
+ ? 1 : -1];
+
#undef CHARACTER1
#undef CHARACTER2