Skip to content

Commit

Permalink
[flang] Fix warning in build (#100134)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
psteinfeld authored Jul 23, 2024
1 parent 511823c commit 6a8c5a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flang/lib/Lower/DirectivesCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6a8c5a9

Please sign in to comment.