This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,fortran] PR32223 Backslash handling inconsistent
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Jerry DeLisle <jvdelisle at verizon dot net>, Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 6 Jun 2007 07:30:11 -0700
- Subject: Re: [patch,fortran] PR32223 Backslash handling inconsistent
- References: <46664029.2030406@verizon.net> <46667053.1070908@net-b.de>
On Wed, Jun 06, 2007 at 10:29:07AM +0200, Tobias Burnus wrote:
> 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
While all of the missing characters might be useful, I think the
current set was chosen for legacy code.
--
Steve