This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, committed] [4.3 Regression] corner case continuation line


This patch committed as obvious and simple.

I have not found a way to add a test case because any dg-error directives in a comment will prevent the error from occurring. This is because we do free-form comment elimination elsewhere so printable characters in comments are seen in load_line.

A future enhancement will be to move free-form comment elimination down into load_line.

Committed revision 131371.

Jerry

2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>

	PR fortran/34659
	* scanner.c (load_line): Do not count ' ' as printable when checking for
	continuations.

Index: scanner.c
===================================================================
--- scanner.c	(revision 131355)
+++ scanner.c	(working copy)
@@ -1176,7 +1176,7 @@ load_line (FILE *input, char **pbuf, int
 	    seen_ampersand = 1;
 	}

-      if ((c != '&' && c != '!') || (c == '!' && !seen_ampersand))
+      if ((c != '&' && c != '!' && c != ' ') || (c == '!' && !seen_ampersand))
 	seen_printable = 1;

/* Is this a fixed-form comment? */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]