How can we know in which Fortran standard a new feature appeared?
For example, I am happy to have discovered the
compiler_options() functions in Milan’s book.
- I can look in my reference book “Modern Fortran explained” (latest version), but it does not tell me when the feature appeared. I could also look in the Fortran 95/2003 version of the book. But I have not the 2008 version.
- I can look in the Fortran standards, but it does not seem to contain the information I need. Same scenario: I would be obliged to search in the PDF of all recent Fortran standards until I can’t find the feature.
- I can write a short program and use the
-std=option of my gfortran compiler and test the latest standards until I encounter an error. I can even do it very quickly with fpm:
$ fpm build --flag --std=f2003
- I can search the function in the documentation of my compiler. And it’s the fastest method I know, the info is generally available in the case of the gfortran doc, for example: COMPILER_VERSION (The GNU Fortran Compiler)
But is there somewhere a page or document with a list which could tell us quickly in which standard a feature was introduced?
And, as a compiler is able to know if a feature is in a specified standard, we can imagine there is a file in its code containing the information. And if it is open-source we could access that file…