From 56d66b12442868c7432a31f3505bca96f6ca45a1 Mon Sep 17 00:00:00 2001 From: ripley Date: Sat, 11 May 2024 12:59:48 +0000 Subject: [PATCH] updares of Fortran 2023 git-svn-id: https://svn.r-project.org/R/trunk@86530 00db46b3-68df-0310-9c12-caf00c1e9a41 --- doc/manual/R-exts.texi | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/manual/R-exts.texi b/doc/manual/R-exts.texi index 2c192f569c1..ded9036531b 100644 --- a/doc/manual/R-exts.texi +++ b/doc/manual/R-exts.texi @@ -2890,7 +2890,7 @@ 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) @@ -2898,10 +2898,25 @@ current platforms use @command{gfortran} where you might need to include 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