diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-04-11 09:15:00 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-04-11 09:15:00 +0200 |
commit | ebf85e50c00c7c0f1fa418c53ccaeff8ec982db9 (patch) | |
tree | a0cd60416dab643f320b8a0a0c5061507bc382c7 | |
parent | cf282d0a4a9174888fd9add60d26acfac1601a0e (diff) | |
download | gcc-ebf85e50c00c7c0f1fa418c53ccaeff8ec982db9.zip gcc-ebf85e50c00c7c0f1fa418c53ccaeff8ec982db9.tar.gz gcc-ebf85e50c00c7c0f1fa418c53ccaeff8ec982db9.tar.bz2 |
io.h (st_parameter_dt): Revert 2005-12-10 change to u.pad, fix comment.
* io/io.h (st_parameter_dt): Revert 2005-12-10 change to
u.pad, fix comment.
(check_st_parameter_dt): New compile time assert.
From-SVN: r112850
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/io.h | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 4f2c6ce..867645d 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2006-04-11 Jakub Jelinek <jakub@redhat.com> + + * io/io.h (st_parameter_dt): Revert 2005-12-10 change to + u.pad, fix comment. + (check_st_parameter_dt): New compile time assert. + 2006-04-10 Jakub Jelinek <jakub@redhat.com> PR libgfortran/24685 diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index b829ad4..cfb9401 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 |