aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/io.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2006-05-29 19:33:43 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2006-05-29 19:33:43 +0000
commitc9f4aa9767727934160c65b63ec69b88e93ec062 (patch)
treed4fabd6c87691525698809329a4aadac6be67a39 /gcc/fortran/io.c
parenta7a8dddd9946fcdba42bc4a65956c8c575a36db5 (diff)
downloadgcc-c9f4aa9767727934160c65b63ec69b88e93ec062.zip
gcc-c9f4aa9767727934160c65b63ec69b88e93ec062.tar.gz
gcc-c9f4aa9767727934160c65b63ec69b88e93ec062.tar.bz2
re PR fortran/27634 (formatted reading/writing: real format without dot)
2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/27634 * io.c (check_format): Add error for missing period in format specifier unless -std=legacy. * gfortran.texi: Add description of expanded namelist read and missing period in format extensions. From-SVN: r114213
Diffstat (limited to 'gcc/fortran/io.c')
-rw-r--r--gcc/fortran/io.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 4a55cbd..aab5d39 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -413,7 +413,6 @@ static try
check_format (void)
{
const char *posint_required = _("Positive width required");
- const char *period_required = _("Period required");
const char *nonneg_required = _("Nonnegative width required");
const char *unexpected_element = _("Unexpected element");
const char *unexpected_end = _("Unexpected end of format string");
@@ -610,8 +609,13 @@ data_desc:
u = format_lex ();
if (u != FMT_PERIOD)
{
- error = period_required;
- goto syntax;
+ /* Warn if -std=legacy, otherwise error. */
+ if (gfc_option.warn_std != 0)
+ gfc_error_now ("Period required in format specifier at %C");
+ else
+ gfc_warning ("Period required in format specifier at %C");
+ saved_token = u;
+ break;
}
u = format_lex ();
@@ -653,8 +657,13 @@ data_desc:
t = format_lex ();
if (t != FMT_PERIOD)
{
- error = period_required;
- goto syntax;
+ /* Warn if -std=legacy, otherwise error. */
+ if (gfc_option.warn_std != 0)
+ gfc_error_now ("Period required in format specifier at %C");
+ else
+ gfc_warning ("Period required in format specifier at %C");
+ saved_token = t;
+ break;
}
t = format_lex ();