[patch, fortran] New take on PR 82373

Thomas Koenig tkoenig@netcologne.de
Thu Oct 12 18:21:00 GMT 2017


Hello world,

after some thought, I think the PR can be fixed by something
far less invasive than my previous patch.

The new version of the patch simply issues an error for a
non-printable character (which should never be legal).
Anything else should be caught by other error reporting
routines.

OK for trunk?

Regards

	Thomas

2017-10-12  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_gooble_whitespace): If a character not printable or
         not newline, issue an error.

2017-10-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/82372
         * gfortran.dg/illegal_char.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p2.diff
Type: text/x-patch
Size: 933 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171012/5add74ab/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: illegal_char_2.f90
Type: text/x-fortran
Size: 28 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171012/5add74ab/attachment-0001.bin>


More information about the Fortran mailing list