[flang-commits] [flang] 6a8c5a9 - [flang] Fix warning in build (#100134)

via flang-commits flang-commits at lists.llvm.org
Tue Jul 23 11:03:21 PDT 2024


Author: Pete Steinfeld
Date: 2024-07-23T11:03:18-07:00
New Revision: 6a8c5a929599a6d47f62c0f243e379ae68a7e434

URL: https://github.com/llvm/llvm-project/commit/6a8c5a929599a6d47f62c0f243e379ae68a7e434
DIFF: https://github.com/llvm/llvm-project/commit/6a8c5a929599a6d47f62c0f243e379ae68a7e434.diff

LOG: [flang] Fix warning in build (#100134)

After tblah's update #99817, I'm getting a warning about an
unusedvariable. It looks to me like the warning is bogus, possibly due
to a bug in the compiler I'm using (GCC 9.3.0). But adding a
"maybe_unused" clause fixes it and makes my builds clean.

Added: 
    

Modified: 
    flang/lib/Lower/DirectivesCommon.h

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h
index 5b8d1f2359c5b..24cb7c2fcf7db 100644
--- a/flang/lib/Lower/DirectivesCommon.h
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -137,7 +137,8 @@ static inline void genOmpAtomicHintAndMemoryOrderClauses(
 }
 
 template <typename AtomicListT>
-static void processOmpAtomicTODO(mlir::Type elementType, mlir::Location loc) {
+static void processOmpAtomicTODO(mlir::Type elementType,
+                                 [[maybe_unused]] mlir::Location loc) {
   if (!elementType)
     return;
   if constexpr (std::is_same<AtomicListT,


        


More information about the flang-commits mailing list