+2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/82372
+ * fortran/scanner.c (last_error_char): New global variable.
+ (gfc_scanner_init_1): Set last_error_char to NULL.
+ (gfc_gobble_whitespace): If a character not printable or
+ not newline, issue an error.
+
2017-10-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/81048
size_t file_changes_cur, file_changes_count;
size_t file_changes_allocated;
+static gfc_char_t *last_error_char;
/* Functions dealing with our wide characters (gfc_char_t) and
sequences of such characters. */
continue_line = 0;
end_flag = 0;
+ last_error_char = NULL;
}
}
while (gfc_is_whitespace (c));
+ if (!ISPRINT(c) && c != '\n' && last_error_char != gfc_current_locus.nextc)
+ {
+ char buf[20];
+ last_error_char = gfc_current_locus.nextc;
+ snprintf (buf, 20, "%2.2X", c);
+ gfc_error_now ("Invalid character 0x%s at %C", buf);
+ }
+
gfc_current_locus = old_loc;
}
+2017-10-15 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/82372
+ * gfortran.dg/illegal_char.f90: New test.
+
2017-10-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Michael Collison <michael.collison@arm.com>