fno-backslash not available in gfortran
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Jun 21 17:45:00 GMT 2005
On Tue, Jun 21, 2005 at 09:07:35AM -0700, Richard E Maine wrote:
>
> On Jun 19, 2005, at 12:31 PM, Steve Kargl wrote:
>
> >On Sun, Jun 19, 2005 at 03:11:45PM -0400, Ian Hutchinson wrote:
>
> >>There's quite a lot of fortran 77 code that will not work without the
> >>equivalent of -fno-backslash. Is it going to be implemented in
> >>gfortran in
> >>the near future?
> >
> >I could not find an open PR requesting this extension.
>
> I have trouble with the concept of calling -fno-backslash an
> "extension". Note the "no" in the name. What it does is turn *OFF* a
> "feature" that does "strange" (in Fortran terms) things to backslash
> characters.
I completely agree with you. I originally thought the OP was requesting
C language processing of backslash as an extension. I did not realize
that gfortran's behavior was already in line with g77.
> Frankly, I consider -fbackslash (without the "no") to be a
> bug and a violation of the standard. If the backslash is a graphic
> character in the processor's character set (which it seems to be as far
> as I can tell), then the standard specifies that it can be used in
> literal character strings without any special provisions. One might be
> able to claim standard-conformance by tiptoeing around with enough
> double-talk such as claiming that it is a control character instead of
> a graphic one, I suppose. Such word tricks won't work in f2003,
> however, because the backslash is part of the standard's required
> character set then.
Tobi, FX, Toon, Paul B.,
Can we agree to reverse the default behavior? If I have
print *, '1\n2'
end
It should print "1\n2" not
1
2
Yes, this will break backwards compatibility with g77, but I beginning
to think that backwards compatibility with g77 is an albatross.
--
Steve
More information about the Fortran
mailing list