Skip to content

Commit 5da9e12

Browse files
committed
[flang] Add [[maybe_unused]] to fix -Werror build
Add the [[maybe_unused]] attribute to a variable in lib/Lower/OpenMP/OpenMP.cpp to avoid a (possibly bogus) unused variable warning when building with GCC 9.3.0.
1 parent fc8d481 commit 5da9e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Lower/OpenMP/OpenMP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ genEnterExitUpdateDataOp(Fortran::lower::AbstractConverter &converter,
840840
llvm::SmallVector<mlir::Attribute> dependTypeOperands;
841841

842842
Fortran::parser::OmpIfClause::DirectiveNameModifier directiveName;
843-
llvm::omp::Directive directive;
843+
[[maybe_unused]] llvm::omp::Directive directive;
844844
if constexpr (std::is_same_v<OpTy, mlir::omp::EnterDataOp>) {
845845
directiveName =
846846
Fortran::parser::OmpIfClause::DirectiveNameModifier::TargetEnterData;

0 commit comments

Comments
 (0)