diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-08 20:54:14 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-08 20:54:14 +0000 |
commit | 7833ddd7f2851ef118671abc07af7cedfd7fe1ed (patch) | |
tree | ff93abb380a7a9b32186abc7f83123e78202327a /libgfortran/io/write.c | |
parent | de83d4725adf72fb9808b30a01a5c4ec05ae8a51 (diff) |
PR libfortran/25425
* trans-decl.c (gfc_generate_function_code): Add new argument,
pedantic, to set_std call.
* libgfortran.h: Add pedantic field to compile_options struct.
* io/write.c (calculate_G_format): Depending on the standard,
choose E or F format for list-directed output of 0.0.
* runtime/error.c (notify_std): Make warning and error dependent
on pedanticity.
* runtime/compile_options.c (set_std): Use new pedantic argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r-- | libgfortran/io/write.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index d7ce6c56807d..edd2933c3de1 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -302,7 +302,8 @@ calculate_G_format (st_parameter_dt *dtp, const fnode *f, /* In case of the two data magnitude ranges, generate E editing, Ew.d[Ee]. */ exp_d = calculate_exp (d); - if ((m > 0.0 && m < 0.1 - 0.05 / exp_d) || (m >= exp_d - 0.5 )) + if ((m > 0.0 && m < 0.1 - 0.05 / exp_d) || (m >= exp_d - 0.5 ) || + ((m == 0.0) && !(compile_options.allow_std & GFC_STD_F2003))) { newf->format = FMT_E; newf->u.real.w = w; |