------- Additional Comments From jakub at redhat dot com 2005-07-11 22:28
-------
Oops. Untested patch, will do more testing tomorrow^Wtoday:
2005-07-12 Jakub Jelinek <[EMAIL PROTECTED]>
PR fortran/22417
* scanner.c (preprocessor_line): Fix file left but not entered
warning.
--- gcc/fortran/scanner.c.jj 2005-07-07 17:56:30.000000000 +0200
+++ gcc/fortran/scanner.c 2005-07-12 00:25:07.000000000 +0200
@@ -908,15 +908,15 @@ preprocessor_line (char *c)
if (flag[2]) /* Ending current file. */
{
- if (strcmp (current_file->filename, filename) != 0)
+ if (!current_file->up
+ || strcmp (current_file->up->filename, filename) != 0)
{
gfc_warning_now ("%s:%d: file %s left but not entered",
current_file->filename, current_file->line,
filename);
return;
}
- if (current_file->up)
- current_file = current_file->up;
+ current_file = current_file->up;
}
/* The name of the file can be a temporary file produced by
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22417