Skip to content

Commit

Permalink
[flang] Disable -Wmaybe-uninitialized for GCC
Browse files Browse the repository at this point in the history
According to llvm/cmake/config-ix.cmake, gcc's potentially uninitialized
use analysis has lots of false positives. We are encountering one in
flang/lib/Lower/CharacterExpr.cpp.

That warning is disabled for gcc in in-tree builds; this does the same
thing for out-of-tree builds.

Differential Revision: https://reviews.llvm.org/D85694
  • Loading branch information
tskeith committed Aug 11, 2020
1 parent ac50efd commit a9795b6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
if(CMAKE_COMPILER_IS_GNUCXX)
set(USE_NO_MAYBE_UNINITIALIZED 1)
endif()

include(CMakeParseArguments)
include(AddLLVM)
Expand Down

0 comments on commit a9795b6

Please sign in to comment.