[flang-commits] [clang] [flang] [Flang] Adding -ffree-line-length-<value> flag (PR #192941)

Jean-Didier PAILLEUX via flang-commits flang-commits at lists.llvm.org
Thu Apr 23 05:35:55 PDT 2026


================
@@ -808,27 +808,34 @@ static bool parseFrontendArgs(FrontendOptions &opts, llvm::opt::ArgList &args,
                            : FortranForm::FreeForm;
   }
 
-  // Set fixedFormColumns based on -ffixed-line-length=<value>
+  // Set fixedFormColumns based on -ffixed-line-length=<value> or
+  // set freeFormColumns based on -ffree-line-length=<value>.
   if (const auto *arg =
-          args.getLastArg(clang::options::OPT_ffixed_line_length_EQ)) {
+          args.getLastArg(clang::options::OPT_ffixed_line_length_EQ,
+                          clang::options::OPT_ffree_line_length_EQ)) {
----------------
JDPailleux wrote:

If you pass both flags, depending on whether you're in free-form or fixed-form, one will be taken into account and the other will not later on. These flags simply set the number of columns for `*FormColumnLimit`

https://github.com/llvm/llvm-project/pull/192941


More information about the flang-commits mailing list