------- Comment #2 from jvdelisle at gcc dot gnu dot org  2007-01-22 05:07 
-------
My read is that within quotes, the ctrl-z character is acceptable and we should
not gobble what is left after seeing one as is done now.

>From F95 standard:   Additional characters may be representable in the
processor, but may appear only in comments(3.3.1.1, 3.3.2.1), character
constants (4.3.2.1), input/output records (9.1.1), and character string edit
descriptors (10.2.1).

The following patch allows the test case in #1 to compile:

Index: scanner.c
===================================================================
--- scanner.c   (revision 121034)
+++ scanner.c   (working copy)
@@ -1064,13 +1064,6 @@ load_line (FILE *input, char **pbuf, int
       if (c == '\0')
        continue;

-      if (c == '\032')
-       {
-         /* Ctrl-Z ends the file.  */
-         while (fgetc (input) != EOF);
-         break;
-       }
-
       /* Check for illegal use of ampersand. See F95 Standard 3.3.1.3.  */
       if (c == '&')
        seen_ampersand = 1;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30532

Reply via email to