[flang-commits] [flang] [flang] Don't defer namelist processing under -pedantic (PR #188854)

via flang-commits flang-commits at lists.llvm.org
Mon Apr 6 13:40:12 PDT 2026


================
@@ -7239,6 +7239,14 @@ bool DeclarationVisitor::Pre(const parser::NamelistStmt::Group &x) {
     groupSymbol = &MakeSymbol(groupName, NamelistDetails{});
     groupSymbol->ReplaceName(groupName.source);
   }
+  // don't defer namelist processing with -pedantic
+  if(context().ShouldWarn(common::UsageWarning::NamelistNoDefer)) {
+    context().Warn(common::UsageWarning::NamelistNoDefer, "Namelist processing not deferred"_port_en_US);
----------------
ivanrodriguez3753 wrote:

You're right, it would error out in any case that the warning would be relevant, so one might as well not put the warning at all and have the user reason about the existing error message. So, my thoughts are to keep the behavior (under -pedantic), but delete the warning? 

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


More information about the flang-commits mailing list