[Bug libfortran/36202] [mingw] Namelist read fails with CRLF
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun May 11 14:26:00 GMT 2008
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-05-11 14:25 -------
Here is proposed patch:
Index: list_read.c
===================================================================
--- list_read.c (revision 135150)
+++ list_read.c (working copy)
@@ -347,20 +347,12 @@ eat_separator (st_parameter_dt *dtp)
case '\r':
dtp->u.p.at_eol = 1;
n = next_char(dtp);
- if (n == '\n')
+ if (n != '\n')
{
- if (dtp->u.p.namelist_mode)
- {
- do
- c = next_char (dtp);
- while (c == '\n' || c == '\r' || c == ' ');
- unget_char (dtp, c);
- }
+ unget_char (dtp, n);
+ break;
}
- else
- unget_char (dtp, n);
- break;
-
+ /* Fall through. */
case '\n':
dtp->u.p.at_eol = 1;
if (dtp->u.p.namelist_mode)
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36202
More information about the Gcc-bugs
mailing list