| 1 |
# Warning flags determined for GCC 14.2.0 with https://github.com/nlohmann/gcc_flags: |
| 2 |
# Ignored GCC warnings: |
| 3 |
# -Wno-abi-tag We do not care about ABI tags. |
| 4 |
# -Wno-aggregate-return The library uses aggregate returns. |
| 5 |
# -Wno-long-long The library uses the long long type to interface with system functions. |
| 6 |
# -Wno-namespaces The library uses namespaces. |
| 7 |
# -Wno-nrvo Doctest triggers this warning. |
| 8 |
# -Wno-padded We do not care about padding warnings. |
| 9 |
# -Wno-system-headers We do not care about warnings in system headers. |
| 10 |
# -Wno-templates The library uses templates. |
| 11 |
|
| 12 |
set(GCC_CXXFLAGS |
| 13 |
-pedantic |
| 14 |
-Werror |
| 15 |
--all-warnings |
| 16 |
--extra-warnings |
| 17 |
-W |
| 18 |
-WNSObject-attribute |
| 19 |
-Wno-abi-tag |
| 20 |
-Waddress |
| 21 |
-Waddress-of-packed-member |
| 22 |
-Wno-aggregate-return |
| 23 |
-Waggressive-loop-optimizations |
| 24 |
-Waligned-new=all |
| 25 |
-Wall |
| 26 |
-Walloc-size |
| 27 |
-Walloc-zero |
| 28 |
-Walloca |
| 29 |
-Wanalyzer-allocation-size |
| 30 |
-Wanalyzer-deref-before-check |
| 31 |
-Wanalyzer-double-fclose |
| 32 |
-Wanalyzer-double-free |
| 33 |
-Wanalyzer-exposure-through-output-file |
| 34 |
-Wanalyzer-exposure-through-uninit-copy |
| 35 |
-Wanalyzer-fd-access-mode-mismatch |
| 36 |
-Wanalyzer-fd-double-close |
| 37 |
-Wanalyzer-fd-leak |
| 38 |
-Wanalyzer-fd-phase-mismatch |
| 39 |
-Wanalyzer-fd-type-mismatch |
| 40 |
-Wanalyzer-fd-use-after-close |
| 41 |
-Wanalyzer-fd-use-without-check |
| 42 |
-Wanalyzer-file-leak |
| 43 |
-Wanalyzer-free-of-non-heap |
| 44 |
-Wanalyzer-imprecise-fp-arithmetic |
| 45 |
-Wanalyzer-infinite-loop |
| 46 |
-Wanalyzer-infinite-recursion |
| 47 |
-Wanalyzer-jump-through-null |
| 48 |
-Wanalyzer-malloc-leak |
| 49 |
-Wanalyzer-mismatching-deallocation |
| 50 |
-Wanalyzer-null-argument |
| 51 |
-Wanalyzer-null-dereference |
| 52 |
-Wanalyzer-out-of-bounds |
| 53 |
-Wanalyzer-overlapping-buffers |
| 54 |
-Wanalyzer-possible-null-argument |
| 55 |
-Wanalyzer-possible-null-dereference |
| 56 |
-Wanalyzer-putenv-of-auto-var |
| 57 |
-Wanalyzer-shift-count-negative |
| 58 |
-Wanalyzer-shift-count-overflow |
| 59 |
-Wanalyzer-stale-setjmp-buffer |
| 60 |
-Wanalyzer-symbol-too-complex |
| 61 |
-Wanalyzer-tainted-allocation-size |
| 62 |
-Wanalyzer-tainted-array-index |
| 63 |
-Wanalyzer-tainted-assertion |
| 64 |
-Wanalyzer-tainted-divisor |
| 65 |
-Wanalyzer-tainted-offset |
| 66 |
-Wanalyzer-tainted-size |
| 67 |
-Wanalyzer-too-complex |
| 68 |
-Wanalyzer-undefined-behavior-strtok |
| 69 |
-Wanalyzer-unsafe-call-within-signal-handler |
| 70 |
-Wanalyzer-use-after-free |
| 71 |
-Wanalyzer-use-of-pointer-in-stale-stack-frame |
| 72 |
-Wanalyzer-use-of-uninitialized-value |
| 73 |
-Wanalyzer-va-arg-type-mismatch |
| 74 |
-Wanalyzer-va-list-exhausted |
| 75 |
-Wanalyzer-va-list-leak |
| 76 |
-Wanalyzer-va-list-use-after-va-end |
| 77 |
-Wanalyzer-write-to-const |
| 78 |
-Wanalyzer-write-to-string-literal |
| 79 |
-Warith-conversion |
| 80 |
-Warray-bounds=2 |
| 81 |
-Warray-compare |
| 82 |
-Warray-parameter=2 |
| 83 |
-Wattribute-alias=2 |
| 84 |
-Wattribute-warning |
| 85 |
-Wattributes |
| 86 |
-Wbool-compare |
| 87 |
-Wbool-operation |
| 88 |
-Wbuiltin-declaration-mismatch |
| 89 |
-Wbuiltin-macro-redefined |
| 90 |
-Wc++0x-compat |
| 91 |
-Wc++11-compat |
| 92 |
-Wc++11-extensions |
| 93 |
-Wc++14-compat |
| 94 |
-Wc++14-extensions |
| 95 |
-Wc++17-compat |
| 96 |
-Wc++17-extensions |
| 97 |
-Wc++1z-compat |
| 98 |
-Wc++20-compat |
| 99 |
-Wc++20-extensions |
| 100 |
-Wc++23-extensions |
| 101 |
-Wc++26-extensions |
| 102 |
-Wc++2a-compat |
| 103 |
-Wcalloc-transposed-args |
| 104 |
-Wcannot-profile |
| 105 |
-Wcast-align |
| 106 |
-Wcast-align=strict |
| 107 |
-Wcast-function-type |
| 108 |
-Wcast-qual |
| 109 |
-Wcast-user-defined |
| 110 |
-Wcatch-value=3 |
| 111 |
-Wchanges-meaning |
| 112 |
-Wchar-subscripts |
| 113 |
-Wclass-conversion |
| 114 |
-Wclass-memaccess |
| 115 |
-Wclobbered |
| 116 |
-Wcomma-subscript |
| 117 |
-Wcomment |
| 118 |
-Wcomments |
| 119 |
-Wcomplain-wrong-lang |
| 120 |
-Wconditionally-supported |
| 121 |
-Wconversion |
| 122 |
-Wconversion-null |
| 123 |
-Wcoverage-invalid-line-number |
| 124 |
-Wcoverage-mismatch |
| 125 |
-Wcoverage-too-many-conditions |
| 126 |
-Wcpp |
| 127 |
-Wctad-maybe-unsupported |
| 128 |
-Wctor-dtor-privacy |
| 129 |
-Wdangling-else |
| 130 |
-Wdangling-pointer=2 |
| 131 |
-Wdangling-reference |
| 132 |
-Wdate-time |
| 133 |
-Wdelete-incomplete |
| 134 |
-Wdelete-non-virtual-dtor |
| 135 |
-Wdeprecated |
| 136 |
-Wdeprecated-copy |
| 137 |
-Wdeprecated-copy-dtor |
| 138 |
-Wdeprecated-declarations |
| 139 |
-Wdeprecated-enum-enum-conversion |
| 140 |
-Wdeprecated-enum-float-conversion |
| 141 |
-Wdisabled-optimization |
| 142 |
-Wdiv-by-zero |
| 143 |
-Wdouble-promotion |
| 144 |
-Wduplicated-branches |
| 145 |
-Wduplicated-cond |
| 146 |
-Weffc++ |
| 147 |
-Welaborated-enum-base |
| 148 |
-Wempty-body |
| 149 |
-Wendif-labels |
| 150 |
-Wenum-compare |
| 151 |
-Wenum-conversion |
| 152 |
-Wexceptions |
| 153 |
-Wexpansion-to-defined |
| 154 |
-Wextra |
| 155 |
-Wextra-semi |
| 156 |
-Wflex-array-member-not-at-end |
| 157 |
-Wfloat-conversion |
| 158 |
-Wfloat-equal |
| 159 |
-Wformat -Wformat-contains-nul |
| 160 |
-Wformat -Wformat-extra-args |
| 161 |
-Wformat -Wformat-nonliteral |
| 162 |
-Wformat -Wformat-security |
| 163 |
-Wformat -Wformat-y2k |
| 164 |
-Wformat -Wformat-zero-length |
| 165 |
-Wformat-diag |
| 166 |
-Wformat-overflow=2 |
| 167 |
-Wformat-signedness |
| 168 |
-Wformat-truncation=2 |
| 169 |
-Wformat=2 |
| 170 |
-Wframe-address |
| 171 |
-Wfree-nonheap-object |
| 172 |
-Wglobal-module |
| 173 |
-Whardened |
| 174 |
-Whsa |
| 175 |
-Wif-not-aligned |
| 176 |
-Wignored-attributes |
| 177 |
-Wignored-qualifiers |
| 178 |
-Wimplicit-fallthrough=5 |
| 179 |
-Winaccessible-base |
| 180 |
-Winfinite-recursion |
| 181 |
-Winherited-variadic-ctor |
| 182 |
-Winit-list-lifetime |
| 183 |
-Winit-self |
| 184 |
-Winline |
| 185 |
-Wint-in-bool-context |
| 186 |
-Wint-to-pointer-cast |
| 187 |
-Winterference-size |
| 188 |
-Winvalid-constexpr |
| 189 |
-Winvalid-imported-macros |
| 190 |
-Winvalid-memory-model |
| 191 |
-Winvalid-offsetof |
| 192 |
-Winvalid-pch |
| 193 |
-Winvalid-utf8 |
| 194 |
-Wliteral-suffix |
| 195 |
-Wlogical-not-parentheses |
| 196 |
-Wlogical-op |
| 197 |
-Wno-long-long |
| 198 |
-Wlto-type-mismatch |
| 199 |
-Wmain |
| 200 |
-Wmaybe-uninitialized |
| 201 |
-Wmemset-elt-size |
| 202 |
-Wmemset-transposed-args |
| 203 |
-Wmisleading-indentation |
| 204 |
-Wmismatched-dealloc |
| 205 |
-Wmismatched-new-delete |
| 206 |
-Wmismatched-tags |
| 207 |
-Wmissing-attributes |
| 208 |
-Wmissing-braces |
| 209 |
-Wmissing-declarations |
| 210 |
-Wmissing-field-initializers |
| 211 |
-Wmissing-include-dirs |
| 212 |
-Wmissing-profile |
| 213 |
-Wmissing-requires |
| 214 |
-Wmissing-template-keyword |
| 215 |
-Wmultichar |
| 216 |
-Wmultiple-inheritance |
| 217 |
-Wmultistatement-macros |
| 218 |
-Wno-namespaces |
| 219 |
-Wnarrowing |
| 220 |
-Wnoexcept |
| 221 |
-Wnoexcept-type |
| 222 |
-Wnon-template-friend |
| 223 |
-Wnon-virtual-dtor |
| 224 |
-Wnonnull |
| 225 |
-Wnonnull-compare |
| 226 |
-Wnormalized=nfkc |
| 227 |
-Wno-nrvo |
| 228 |
-Wnull-dereference |
| 229 |
-Wodr |
| 230 |
-Wold-style-cast |
| 231 |
-Wopenacc-parallelism |
| 232 |
-Wopenmp |
| 233 |
-Wopenmp-simd |
| 234 |
-Woverflow |
| 235 |
-Woverlength-strings |
| 236 |
-Woverloaded-virtual=2 |
| 237 |
-Wpacked |
| 238 |
-Wpacked-bitfield-compat |
| 239 |
-Wpacked-not-aligned |
| 240 |
-Wno-padded |
| 241 |
-Wparentheses |
| 242 |
-Wpedantic |
| 243 |
-Wpessimizing-move |
| 244 |
-Wplacement-new=2 |
| 245 |
-Wpmf-conversions |
| 246 |
-Wpointer-arith |
| 247 |
-Wpointer-compare |
| 248 |
-Wpragmas |
| 249 |
-Wprio-ctor-dtor |
| 250 |
-Wpsabi |
| 251 |
-Wrange-loop-construct |
| 252 |
-Wredundant-decls |
| 253 |
-Wredundant-move |
| 254 |
-Wredundant-tags |
| 255 |
-Wregister |
| 256 |
-Wreorder |
| 257 |
-Wrestrict |
| 258 |
-Wreturn-local-addr |
| 259 |
-Wreturn-type |
| 260 |
-Wscalar-storage-order |
| 261 |
-Wself-move |
| 262 |
-Wsequence-point |
| 263 |
-Wshadow=compatible-local |
| 264 |
-Wshadow=global |
| 265 |
-Wshadow=local |
| 266 |
-Wshift-count-negative |
| 267 |
-Wshift-count-overflow |
| 268 |
-Wshift-negative-value |
| 269 |
-Wshift-overflow=2 |
| 270 |
-Wsign-compare |
| 271 |
-Wsign-conversion |
| 272 |
-Wsign-promo |
| 273 |
-Wsized-deallocation |
| 274 |
-Wsizeof-array-argument |
| 275 |
-Wsizeof-array-div |
| 276 |
-Wsizeof-pointer-div |
| 277 |
-Wsizeof-pointer-memaccess |
| 278 |
-Wstack-protector |
| 279 |
-Wstrict-aliasing=3 |
| 280 |
-Wstrict-null-sentinel |
| 281 |
-Wstrict-overflow |
| 282 |
-Wstring-compare |
| 283 |
-Wstringop-overflow=4 |
| 284 |
-Wstringop-overread |
| 285 |
-Wstringop-truncation |
| 286 |
-Wsubobject-linkage |
| 287 |
-Wsuggest-attribute=cold |
| 288 |
-Wsuggest-attribute=const |
| 289 |
-Wsuggest-attribute=format |
| 290 |
-Wsuggest-attribute=malloc |
| 291 |
-Wsuggest-attribute=noreturn |
| 292 |
-Wsuggest-attribute=pure |
| 293 |
-Wsuggest-attribute=returns_nonnull |
| 294 |
-Wsuggest-final-methods |
| 295 |
-Wsuggest-final-types |
| 296 |
-Wsuggest-override |
| 297 |
-Wswitch |
| 298 |
-Wswitch-bool |
| 299 |
-Wswitch-default |
| 300 |
-Wswitch-enum |
| 301 |
-Wswitch-outside-range |
| 302 |
-Wswitch-unreachable |
| 303 |
-Wsync-nand |
| 304 |
-Wsynth |
| 305 |
-Wno-system-headers |
| 306 |
-Wtautological-compare |
| 307 |
-Wno-templates |
| 308 |
-Wterminate |
| 309 |
-Wtrampolines |
| 310 |
-Wtrigraphs |
| 311 |
-Wtrivial-auto-var-init |
| 312 |
-Wtsan |
| 313 |
-Wtype-limits |
| 314 |
-Wundef |
| 315 |
-Wunicode |
| 316 |
-Wuninitialized |
| 317 |
-Wunknown-pragmas |
| 318 |
-Wunreachable-code |
| 319 |
-Wunsafe-loop-optimizations |
| 320 |
-Wunused |
| 321 |
-Wunused-but-set-parameter |
| 322 |
-Wunused-but-set-variable |
| 323 |
-Wunused-const-variable=2 |
| 324 |
-Wunused-function |
| 325 |
-Wunused-label |
| 326 |
-Wunused-local-typedefs |
| 327 |
-Wunused-macros |
| 328 |
-Wunused-parameter |
| 329 |
-Wunused-result |
| 330 |
-Wunused-value |
| 331 |
-Wunused-variable |
| 332 |
-Wuse-after-free=3 |
| 333 |
-Wuseless-cast |
| 334 |
-Wvarargs |
| 335 |
-Wvariadic-macros |
| 336 |
-Wvector-operation-performance |
| 337 |
-Wvexing-parse |
| 338 |
-Wvirtual-inheritance |
| 339 |
-Wvirtual-move-assign |
| 340 |
-Wvla |
| 341 |
-Wvla-parameter |
| 342 |
-Wvolatile |
| 343 |
-Wvolatile-register-var |
| 344 |
-Wwrite-strings |
| 345 |
-Wxor-used-as-pow |
| 346 |
-Wzero-as-null-pointer-constant |
| 347 |
-Wzero-length-bounds |
| 348 |
) |