[flang-commits] [flang] [flang][Semantics] Introduce `-Wpass-global-variable` warning (PR #160324)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Tue Sep 23 09:59:41 PDT 2025
================
@@ -149,6 +149,7 @@ LanguageFeatureControl::LanguageFeatureControl() {
warnUsage_.set(UsageWarning::HostAssociatedIntentOutInSpecExpr);
warnUsage_.set(UsageWarning::NonVolatilePointerToVolatile);
warnUsage_.set(UsageWarning::RealConstantWidening);
+ warnUsage_.set(UsageWarning::PassGlobalVariable);
----------------
akuhlens wrote:
This should definitely not be a warning enabled by default, and I probably wouldn't even want this one to fire with `-Wall`, which leads to questions about how this should be implemented.
https://github.com/llvm/llvm-project/pull/160324
More information about the flang-commits
mailing list