[flang-commits] [clang] [flang] [Flang] Adding -ffree-line-length-<value> flag (PR #192941)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Fri May 1 12:18:37 PDT 2026
================
@@ -568,6 +569,8 @@ void Prescanner::SkipToEndOfLine() {
bool Prescanner::MustSkipToEndOfLine() const {
if (inFixedForm_ && column_ > fixedFormColumnLimit_ && !tabInCurrentLine_) {
return true; // skip over ignored columns in right margin (73:80)
+ } else if (!inFixedForm_ && column_ > freeFormColumnLimit_) {
----------------
akuhlens wrote:
Why not just use `0` as a sentinel value here, and not allow 0 on the command line?
```suggestion
} else if (!inFixedForm_ && freeFormColumnLimit_ != 0 && column_ > freeFormColumnLimit_) {
```
If someone creates a minified program or some other dumb thing the arbitrary limit will be discovered. Even if this never happens, we as the programmers will have to continue to worry if it could happen as time goes on, arbitrary limits are not worth the added cognitive overhead.
https://github.com/llvm/llvm-project/pull/192941
More information about the flang-commits
mailing list