aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2004-07-11 15:35:33 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2004-07-11 15:35:33 +0200
commitcdde7b65fa3b0e5d63984991fad01ad75881b3cc (patch)
treed10e9209b519358eeedb84667347e5723b6b4499 /gcc/fortran
parent953e663055414d35b92d0aed7c40f9502f49a613 (diff)
downloadgcc-cdde7b65fa3b0e5d63984991fad01ad75881b3cc.zip
gcc-cdde7b65fa3b0e5d63984991fad01ad75881b3cc.tar.gz
gcc-cdde7b65fa3b0e5d63984991fad01ad75881b3cc.tar.bz2
re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))
PR fortran/16404 * io.c (match_io): Flag 'WRITE(...), ...' as extension. From-SVN: r84510
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog3
-rw-r--r--gcc/fortran/io.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 0c78414..4ed7899 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -4,6 +4,9 @@
* module.c (gfc_dump_module, gfc_use_module): Print locus
when opening of module file fails.
+ PR fortran/16404
+ * io.c (match_io): Flag 'WRITE(...), ...' as extension.
+
2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
* f95-lang.c (set_block): Remove.
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index 6311972..5db519a 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -2146,8 +2146,12 @@ loop:
get_io_list:
/* Optional leading comma (non-standard). */
- if (!comma_flag)
- gfc_match_char (',');
+ if (!comma_flag
+ && gfc_match_char (',') == MATCH_YES
+ && k == M_WRITE
+ && gfc_notify_std (GFC_STD_GNU, "Comma before output item list "
+ "at %C is an extension") == FAILURE)
+ return MATCH_ERROR;
io_code = NULL;
if (gfc_match_eos () != MATCH_YES)