awesome-cpp-warning icon indicating copy to clipboard operation
awesome-cpp-warning copied to clipboard

c++ warning correspondence table (Clang/GCC and Visual Studio)

awesome-cpp-warning

c++ warning correspondence table (Clang/GCC and Visual Studio)

Reference

Details

  • VC++ List
  • GCC/Clang warning release notes

Table

GCC Group GCC Warn Clang Group Clang Warn VC Group VC Warn
warning -Wmacro-redefined /W1 C4005
-Wcomment -Wcomment /W1 C4010
-Wsign-compare [-Wsign-compare][] /W3 C4018, C4287
-Wsign-compare [-Wsign-compare][] /W4 C4388, C4389
-Wextra-semi-stmt /W4 C4019
- -Wswitch-enum - [-Wswitch-enum][] /W4 C4061
-Wswitch [-Wswitch][] /W4 C4062
-Wswitch [-Wswitch][] C4063
-Wendif-labels -Wextra-tokens /W1 C4067
-Wunknown-pragmas [-Wunknown-pragmas][] /W1 C4068
-Wmismatched-tags /W2 C4099
-Wunused-parameter [-Wunused-parameter][] /W4 C4100
-Wunused-variable [-Wunused-variable][] /W3 C4101
-Wunused-variable [-Wunused-variable][] /W4 C4189
-Wunused-label [-Wunused-label][] /W3 C4102
-Wpragma-pack /W1 C4103
-pedantic warning -pedantic -Wgnu-zero-line-directive /W1,4 C4112
-Wduplicate-decl-specifier /W1 C4114, C4141
-Wbuiltin-macro-redefined -Wbuiltin-macro-redefined /W1 C4117
warning [-Wunknown-escape-sequence][] /W1 C4129
-Waddress [-Wstring-compare][] /W4 C4130
[-Wswitch-bool][] /W1 C4144, C4145
-Wdelete-incomplete -Wdelete-incomplete /W2 C4150
-Wreturn-local-addr -Wreturn-stack-address /W1 C4172
-Wnarrowing error -Wc++11-narrowing /W1 C4178, C4838
-Wignored-qualifiers /W1 C4180
-Wignored-qualifiers /W3 C4197
-Wreturn-type-c-linkage /W1 C4190
-pedantic -Wpedantic -pedantic [-Wzero-length-array][] /W2,4 C4200
-pedantic -Wpedantic -pedantic -Wgnu-anonymous-struct /W4 C4201
- -Wconversion - -Wimplicit-int-conversion /W4 C4242
- -Wfloat-conversion - -Wfloat-conversion /W2 C4244
- -Wconversion - -Wconversion /W3,4 C4244
- -Wsign-conversion - [-Wsign-conversion][] /W2 C4308
- -Wsign-conversion - [-Wsign-conversion][] /W4 C4245, C4365
- -Woverloaded-virtual -Woverloaded-virtual /W4 C4263
- -Wnon-virtual-dtor - -Wnon-virtual-dtor /W3 C4265
- -Wnon-virtual-dtor - -Wnon-virtual-dtor C5204
- -Wconversion - [-Wshorten-64-to-32][] /W3 C4267
warning -Wexceptions /W1 C4286
-Wshift-count-overflow [-Wshift-count-overflow][] /W1 C4293
[-Wtype-limits][] [-Wtautological-unsigned-zero-compare][] /W4 C4296
- -Wold-style-cast - -Wold-style-cast C4303
- -Wfloat-conversion - -Wimplicit-float-conversion /W1 C4305
-Woverflow -Winteger-overflow /W2 C4307
- -Wconversion -Wconstant-conversion /W2 C4309
-Wint-to-void-pointer-cast -Wint-to-void-pointer-cast /W1 C4312
-Wformat -Wformat /W1 C4313, C4473, C4477
-Wformat -Wformat /W3 C4475, C4476
-Wformat-extra-args -Wformat-extra-args /W1 C4317
-Wformat-extra-args -Wformat-extra-args /W3 C4474
-Wmemset-transposed-args -Wmemset-transposed-args C4318
-Wempty-body -Wempty-body /W3 C4390
warning -Wmissing-declarations /W4 C4408
error [-Wunicode][] /W4 C4429
- -Wshadow - -Wshadow /W4 C4456, C4457, C4458, C4459
- -Wshadow - -Wshadow-field-in-constructor
-Wbitfield-constant-conversion /W4 C4463
-Waddress -Wcomma /W1 C4545, C4546
-Wcomma /W4 C4913
[-Wtautological-compare][] [-Wunused-comparison][] /W1 C4547
-Wunused-value [-Wunused-comparison][] /W1 C4549, C4553
-Wunused-value [-Wunused-value][] /W1 C4548, C4552, C4555
-Wunused-value (-Waddress) [-Wunused-value][] /W1 C4551
-Wparentheses [-Wshift-op-parentheses][] /W3 C4554
-Wmultichar error /W1 C4566
-Winaccessible-base -Winaccessible-base /W1 C4584
- -Wundef - [-Wundef][] /W4 C4668
-Wuninitialized [-Wuninitialized][] /W1,4 C4700
[-Wsometimes-uninitialized][] /W4 C4701, C4703
- -Wunreachable-code - [-Wunreachable-code][] /W1 C4288
- -Wunreachable-code - [-Wunreachable-code][] /W4 C4702
-Wparentheses -Wparentheses /W4 C4706
-Wcomma-subscript -Wdeprecated-comma-subscript /W4 C4709
-Wreturn-type -Wreturn-type /W1 C4715, C4716
-Winfinite-recursion /W1 C4717
-Wdiv-by-zero -Wdivision-by-zero /W3 C4723, C4274
-Wcast-align /W1 C4739
-Wfortify-source /W1 C4789
-Wbool-compare [-Wtautological-constant-out-of-range-compare][] /W1 C4806
[-Wswitch-outside-range][] (-Wswitch-bool) /W1 C4808
[-Wvexing-parse][] /W1 C4930
-Wreinterpret-base-class /W1 C4946
-Wdeprecated -Wdeprecated /W1 C4973, C4974
warning -Wc++17-extensions C4984
-Wdeprecated-declarations -Wdeprecated-declarations /W3 C4996
-Wreorder -Wreorder-ctor C5038
-Wexpansion-to-defined -Wexpansion-to-defined /W1 C5105
- -Wimplicit-int-float-conversion /Wall C5219
-Wabsolute-value
-Wabstract-final-class
error - -Wambiguous-reversed-operator
- -Wcovered-switch-default
- -Wdouble-promotion - -Wdouble-promotion
- -Wexit-time-destructors
- -Wglobal-constructors
- -Wgnu-zero-variadic-macro-arguments
- -Winconsistent-missing-destructor-override
-Winconsistent-missing-override
-Wdangling-else -Wdangling-else
-Wdangling-gsl
-Wmissing-braces
- -Wmissing-noreturn - -Wmissing-noreturn
- -Wnull-arithmetic
-Wconversion-null -Wnull-conversion
-Wparentheses-equality
- [-Wsuggest-attribute=noreturn][] (-Wmissing-noreturn)
- -Wshadow-compatible-local -Wshadow-all [-Wshadow-uncaptured-local][]
- [-Wsuggest-destructor-override][]
- -Wsuggest-override - [-Wsuggest-override][]
- [-Wzero-as-null-pointer-constant][]

[-Wshadow-uncaptured-local]:(https://wandbox.org/permlink/gL3312D14GJsvxWW [-Wshift-count-overflow]:https://wandbox.org/permlink/0c0V7KDrG6bzAelS [-Wshift-op-parentheses]:https://wandbox.org/permlink/amX76yhKYrTeGblb [-Wshorten-64-to-32]:https://wandbox.org/permlink/PV73kTvl4LkSOcQG [-Wsign-compare]:https://wandbox.org/permlink/fxZyhxNfIrukjAjs [-Wsign-conversion]:https://wandbox.org/permlink/nar9aUENFpL8ZlCq [-Wsometimes-uninitialized]:https://wandbox.org/permlink/OKj3yYplXtXeG1uB [-Wstring-compare]:https://wandbox.org/permlink/zgBHQfYXOT7KIGGg [-Wsuggest-attribute=noreturn]:https://wandbox.org/permlink/34UHOrtmkMPIDLy1 [-Wsuggest-destructor-override]:https://wandbox.org/permlink/9hBh6F59skKaNE3Y [-Wsuggest-override]:https://wandbox.org/permlink/QATLGuvGEZAfPnlK [-Wswitch]:https://wandbox.org/permlink/X14xNQbbxmgU1W2f [-Wswitch-bool]:https://wandbox.org/permlink/vL1ObRTKd8d0hkOR [-Wswitch-outside-range]:https://wandbox.org/permlink/RYbygUf1gRwsEXkh [-Wswitch-enum]:https://wandbox.org/permlink/PUm5ULD8MXDnpoye [-Wtautological-constant-out-of-range-compare]:https://wandbox.org/permlink/5JWWi1sh4UzxlbaH [-Wtautological-compare]:https://wandbox.org/permlink/Y7SS3gQJXDkicCwI [-Wtautological-unsigned-zero-compare]:https://wandbox.org/permlink/oMzIhOyrkFxlUsi0 [-Wtype-limits]:https://wandbox.org/permlink/8naEWNJet3GNbWpV [-Wundef]:https://wandbox.org/permlink/jGR75x8PNLTi3dfB [-Wuninitialized]:https://wandbox.org/permlink/hy2fINy0pbOrCjJR [-Wunknown-escape-sequence]:https://wandbox.org/permlink/PfTVPU34dqwKMRSh [-Wunknown-pragmas]:https://wandbox.org/permlink/D8mn6FhQXORZBUkp [-Wunreachable-code]:https://wandbox.org/permlink/9Tr3vBQAxzTEvuN2 [-Wunicode]:https://wandbox.org/permlink/GPxeMy17a3L2yibh [-Wunused-comparison]:https://wandbox.org/permlink/zhaQHii56U35haMG [-Wunused-label]:https://wandbox.org/permlink/slCUpdY7trnfRtFU [-Wunused-parameter]:https://wandbox.org/permlink/Lg6HoqMG8MZGuvHp [-Wunused-value]:https://wandbox.org/permlink/vm2J5xlyxySBqWgz [-Wunused-variable]:https://wandbox.org/permlink/sZKVILFpyoQUnljb [-Wvexing-parse]:https://wandbox.org/permlink/VOOIavontGmvvYVE [-Wzero-as-null-pointer-constant]:https://wandbox.org/permlink/C2A7xhoBUe5bgLjB [-Wzero-length-array]:https://wandbox.org/permlink/dCOhebgvxxv9adE5