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] PR32223 Backslash handling inconsistent


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


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