The command line options -Wno-error and -Wno-unused-parameter are specific to gcc/clang, do not use them when compiling with other compilers.
This patch is part of the series to make flang compilable with MS Visual Studio.
Differential D85355
[flang][msvc] Do not use gcc/clang command line options for msvc. Meinersbur on Aug 5 2020, 1:24 PM. Authored by
Details The command line options -Wno-error and -Wno-unused-parameter are specific to gcc/clang, do not use them when compiling with other compilers. This patch is part of the series to make flang compilable with MS Visual Studio.
Diff Detail
Event TimelineComment Actions What's the reason for keeping these? IMO, the lines should be removed and let FLANG_ENABLE_WERROR cmake option add it if a developer needs it. Comment Actions We always built with -Werror before we contributed f18 to llvm, and still do so in-house for the discipline it enforces, but gcc's warning about unused function arguments produced false messages in the case of templatized code (esp. with constexpr) that are not practical to work around, so that warning is explicitly disabled. Comment Actions I removed the setting of CMAKE_CXX_FLAGS and couldn't find a version of GCC that failed. Can we just get rid of this? @schweitz? |