This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [gfortran] Add new -std=legacy command line option


Feng Wang wrote:
> --- Janne Blomqvist <jblomqvi@cc.hut.fi> дµÀ:
> > I think stuff like Hollerith would be well suited for GFC_STD_LEGACY
> > as well (wasn't there a patch to add Hollerith support a few days
> > ago?).
>
> Yes. http://gcc.gnu.org/ml/fortran/2005-05/msg00280.html
> I think the Hollerith constant is different. When people use Hollerith
> constants, they are clear that this statement should be supported by the
> compiler. I mean the compiler should not accept user's error and meanwhile
> should not reject user's intention. LOGICAL <-> INTEGER conversion may be the
> error of the programmer (e.g. typo error). But Hollerith constant will not. I
> think it had better be the proud of gnu. Haha... :-)

When someone _types_ a Hollerith constant, yes, they are clearly
expecting that the compiler should support it.

However, I would think that at this point in time, virtually all of
usage of Hollerith constants will come from people trying to recompile
older legacy code.  In those cases, I'm not sure that we can be nearly
so certain about their expectations -- they may not even know that the
code has Hollerith constants in it.  (They may not even know what a
Hollerith constant is, much as I didn't until this subject came up here,
in which case a helpful warning message might help them figure it out
what they're looking at when they're trying to modify one.)  So, it
might be better to keep the warning -- if people don't want warnings
when compiling legacy code with outdated features, that's what
-std=legacy is for.

- Brooks


-- 
The "bmoses-nospam" address is valid; no unmunging needed.


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