flang icon indicating copy to clipboard operation
flang copied to clipboard

Clang 12 fails to build Flang with `-DWITH_WERROR=ON`

Open bryanpkc opened this issue 4 years ago • 1 comments

Setting the CMake variable WITH_WERROR=ON tells Clang to compile Flang code with -Werror, which turns compile-time warnings into fatal errors. This had to be turned off by default in b8b491466da3 since LLVM 12 now produces many more warnings than previous LLVM versions.

I will submit a number of PRs to fix the Flang code base, in order to reduce the number of compile-time warnings, and enable WITH_WERROR=ON to be used again. Some problems requiring more extensive changes will be considered in future issues.

bryanpkc avatar Jun 06 '21 14:06 bryanpkc

List of PRs in preferred merge order (more to come):

  • #1066
  • #1067
  • #1068
  • #1069
  • #1070
  • #1071
  • #1072
  • #1073
  • #1074
  • #1075
  • #1076
  • #1077
  • #1078
  • #1079
  • #1080
  • #1081
  • #1092
  • #1126
  • #1130
  • #1123
  • #1124
  • #1160
  • #1162
  • #1164
  • #1174
  • #1180
  • #1191

~~The following are "roll-up" patches addressing multiple warnings in each major component, and depend on the patches above getting merged first:~~

  • ~~#1085~~
  • ~~#1086~~
  • ~~#1087~~

bryanpkc avatar Jun 06 '21 15:06 bryanpkc