[patch,fortran] PR32223 Backslash handling inconsistent
Tobias Burnus
burnus@net-b.de
Wed Jun 6 08:29:00 GMT 2007
Hi,
Jerry DeLisle wrote:
> Actually the backslash handling is quite consistent, however we did
> not include the '\0' case.
Well, in principle we miss (cf. "6.4.4.4 Character constants" in C99):
\" and \', and \o \oo \ooo (where "o" is an octal digit), \xh, \xhh,
\xhhh, ... (where "h" is an hexadecimal digit; for normal and wide
character). The trigraphs ("??=" -> "#", with \? ...) one probably does
not use anywhere anymore.
I think don't think \' and \" are needed as one can use '' and "".
achar() can be used for the others though not as "data foo/achar(0)/"
but only as "character, parameter :: charNull=achar(0); data foo/charNull/".
Thus with "\0" (used for pre-ISO-C-Binding C interoperability) we cover
by far the most frequent cases, but by far not all.
(I think the patch is ok [modulo the mentioned whitespace issues and
Steve's patch] and should be sufficient until some PR comes up where for
more \ooo or \xHH is asked.)
Tobias
More information about the Fortran
mailing list