This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran,patch] add ISO_FORTRAN_ENV intrinsic module
- From: Tobias Burnus <burnus at net-b dot de>
- Cc: François-Xavier Coudert <fxcoudert at gmail dot com>, GFORTRAN <fortran at gcc dot gnu dot org>, GCC-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 04 Nov 2006 14:43:51 +0100
- Subject: Re: [gfortran,patch] add ISO_FORTRAN_ENV intrinsic module
- References: <email@example.com> <firstname.lastname@example.org> <A8F0D5CC-C2FB-4DE0-A77A-9A606A025CE0@gmail.com> <email@example.com> <454C90D2.firstname.lastname@example.org>
Tobias Burnus wrote:
> Maybe one should give a better error message for:
> use, intrinsic iso_fortran_env
> Error: Unclassifiable statement at (1)
> This usage is invalid in Fortran 2003, however g95, NAG f95 and ifort
> accept this and if it works with several compilers and you see this
> message with the gfortran, you may wrongly assume either that gfortran
> has a bug or does not support (non_)intrinsic.
> Suggested fix: Accept it with -std=gnu, reject it with a nice error with
Just for completeness: I filled bugreports for g95, NAG f95 and ifort to
give at least a warning (with -std=f2003, -f2003, -stand f03) and I
tested with sunf95:
use,intrinsic iso_fortran_env,only: stdErr => error_unit
"iso_const.f90", Line = 2, Column = 16: ERROR: Unexpected syntax: "::"
was expected but found "I".
I'm still unsure whether one should accept it with -std=gnu or reject it
sunf95 also gives a (default) warning which we might also want to give:
If a module exists as intrinsic and as non_intrinsic module, sunf95 writes:
use iso_fortran_env,only: stdErr => error_unit
"iso_const.f90", Line = 2, Column = 6: WARNING: This name of
nonintrinsic module may disguise the name of intrinsic module
I don't know whether we want to follow suit (default warning or only
with a -W* option).