Skip to content

Commit

Permalink
updares of Fortran 2023
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@86530 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed May 11, 2024
1 parent 1ed73d6 commit 56d66b1
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions doc/manual/R-exts.texi
Expand Up @@ -2890,18 +2890,33 @@ selected as @samp{FC}, so platforms might be encountered which only
support Fortran 90. However, Fortran 95 is supported on all known
platforms.

Most compilers specified by @samp{FC} will accept Fortran 2003, 2008 or
Most compilers specified by @samp{FC} will accept most Fortran 2003, 2008 or
2018 code: such code should still use file extension @file{.f90}. Most
current platforms use @command{gfortran} where you might need to include
@option{-std=f2003}, @option{-std=f2008} or (from version 8)
@option{-std=f2018} in @code{PKG_FFLAGS} or @code{PKG_FCFLAGS}: the
default is `GNU Fortran', currently Fortran 2018 (but Fortran 95 prior
to @command{gfortran}@tie{}8) with non-standard extensions. The other
compilers in current use (@I{LLVM}'s @command{flang-new} and Intel's
@command{ifx}) default to Fortran 2018.
@command{ifx}) default to Fortran 2018@footnote{but was said to have
complete support only from version 2023.0.0.}.

It is good practice to describe a Fortran version requirement in
@file{DESCRIPTION}'s @samp{SystemRequirements} field.
@file{DESCRIPTION}'s @samp{SystemRequirements} field. Note that this is
purely for information: the package also needs a @command{configure}
script to determine the compiler and set approrpriate option(s) and test
that the features needed from the standard are actually supported.

The Fortran 2023 released in Nov 2023: as usual compiler vedors are
introducing support incrementally.
For Intel's @command{ifx} see
@uref{https://www.intel.com/content/www/us/en/developer/articles/technical/fortran-language-and-openmp-features-in-ifx.html#Fortran%20Standards}.
For LLVM's @command{flang-new} see
@uref{https://flang.llvm.org/docs/F202X.html}.
@code{gfortran} does not have complete support even for the 2008 and
2018 standards, but recent versions support the option @option{-std=f2023}.
@c https://gcc.gnu.org/wiki/Fortran2008Status
@c https://gcc.gnu.org/wiki/Fortran2018Status

@c The Oracle @command{f95} compiler `accepts some Fortran 2003/8 features'
@c (search for `Oracle Developer Studio 12.6: Fortran User's Guide' and
Expand Down

0 comments on commit 56d66b1

Please sign in to comment.