[flang-commits] [flang] [flang] Add guidelines for referencing the Fortran Standard (PR #188591)

Vineet Kumar via flang-commits flang-commits at lists.llvm.org
Thu Mar 26 07:25:42 PDT 2026


https://github.com/vntkmr updated https://github.com/llvm/llvm-project/pull/188591

>From dcad78e8b502a412023cbe5c112439293b85a3d4 Mon Sep 17 00:00:00 2001
From: Vineet Kumar <vineetk at hpe.com>
Date: Wed, 25 Mar 2026 15:08:24 -0500
Subject: [PATCH] [flang] Add guidelines for referencing the Fortran Standard

---
 flang/docs/C++style.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/flang/docs/C++style.md b/flang/docs/C++style.md
index e061b61a05c6b..ade88d22eba36 100644
--- a/flang/docs/C++style.md
+++ b/flang/docs/C++style.md
@@ -97,6 +97,18 @@ when creating names.
 well as you do and avoid distracting her by calling out usage of new
 features in comments.
 
+### Referencing the Fortran Standard
+When referencing the Fortran Standard, always qualify the reference
+with the version. Use the format `F<version>` as a prefix. For
+sections and paragraphs, use e.g., `F2023 9.7.3.2 p7` (Fortran
+2023, section 9.7.3.2, paragraph 7). For rules and constraints,
+use e.g., `F2023 R1526` or `F2018 C919`.
+
+#### Notes
+1. If no version is mentioned, the default is assumed to be `F2018`.
+1. Existing code may use the `F'2023` style (with an apostrophe).
+   New code should omit the apostrophe for consistency.
+
 ### Layout
 Always run `clang-format` on your changes before committing code. LLVM
 has a `git-clang-format` script to facilitate running clang-format only



More information about the flang-commits mailing list