fno-backslash not available in gfortran
Richard E Maine
Richard.Maine@NASA.GOV
Tue Jun 21 16:07:00 GMT 2005
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. 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.
Backslash processing in the C preprocessor I can understand. Presumably
people who use the C preprocessor expect at least some C-like
behaviors. But I find it nothing short of baroque to inflict this
strange C convention on purely Fortran code by default. And the thought
that there isn't even an option to turn it off... Well, that would be a
show-stopper for lots of codes. I hadn't gotten that far in porting my
codes (stopped by other bugs that are in the bug database), but if I
got that far, I doubt I'd try to work around undefeatable C backslash
processing - I'd just say that the compiler wasn't yet suitable for use
on my codes.
--
Richard Maine | Good judgment comes from experience;
Richard.Maine@nasa.gov | experience comes from bad judgment.
| -- Mark Twain
More information about the Fortran
mailing list