[flang-commits] [flang] [flang][driver] -Werror promotes warnings to error and interopts with -Wfatal-errors (PR #148748)

Andre Kuhlenschmidt via flang-commits flang-commits at lists.llvm.org
Tue Jul 15 10:01:37 PDT 2025


================
@@ -467,9 +473,13 @@ void Messages::Emit(llvm::raw_ostream &o, const AllCookedSources &allCooked,
       // Don't emit two identical messages for the same location
       continue;
     }
-    msg->Emit(o, allCooked, echoSourceLines, hintFlagPtr);
+    // We think it is confusing to users to display warnings and other
+    // diagnostics as errors, instead we just treat them as errors for the
+    // purpose of failing.
+    msg->Emit(o, allCooked, echoSourceLines, hintFlagPtr,
+        /*warningsAreErrors=*/false);
----------------
akuhlens wrote:

Yes, I was drawing attention to it by passing it explicitly. Since it wasn't the behavior that I expected.

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


More information about the flang-commits mailing list