This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [patch, Fortran] Fix PR 82372


Hi Steve,

the attached patch displays an error for characters which are
outside the normal Fortran character set, and includes a hex

If this              ^^^^^^^^^^^^^^^^^^^^^

corresponds to this statement,

+char valid_chars[] =
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+  "=+*-/^%[].,\n\t\r'\"();:<>_!$&0123456789";

then this is not correct.

You're correct, my statement above was misleading.

What I meant was the characters which can occur inside
normal Fortran syntax, plus a few more places, such as an
!$OMP statement.

From F2003, letters, digits,
underscore, and special characters (see Table 3.1) are
members of the Fortran character set.  Your string includes
\n, \t, and \r, which are not in the Fortran character set.
\t we warn about separetely. \n and \r can occur during parsing,
so we should not warn about them,

Your string is missing \, {, }, ~, `, |, #, and @.

AFAIK, none of these characters can come up in an normal Fortran
statement except for a comment, string, format or continuation
character in fixed form.

Regards

	Thomas


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