https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100629
--- Comment #24 from James McKelvey <mckelvey at maskull dot com> --- Running Cygwin 3.2.0(0.340/5/3) under Windows 10. Using built-in specs. COLLECT_GCC=/usr/local/bin/g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-cygwin/11.1.1/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: ./configure --enable-languages=c,c++ Thread model: single Supported LTO compression algorithms: zlib gcc version 11.1.1 20210515 (GCC) Compiler options compiling project: /usr/local/bin/g++ -std=c++0x -c -O3 -DNDEBUG -DUSE_INTL=1 -DUSE_MUTEX=1 -D_FORTIFY_SOURCE=1 -pedantic-errors -Werror -fno-common -Wall -Wold-style-cast -Wsign-promo -Wpointer-arith -Wundef -Wwrite-strings -Winvalid-pch -Woverloaded-virtual -Wcast-qual -Wextra -Wredundant-decls -Wshadow -Wcast-align=strict -Wcomment -fstrict-aliasing -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wlogical-op -Wconversion -Wsign-conversion -Wmissing-declarations -Wdeprecated -ftree-switch-conversion -Wuninitialized -Wparentheses -Wimplicit-fallthrough=5 -Wformat-nonliteral -Wformat-truncation=2 -Wformat-signedness -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-security -Wnull-dereference -Wmain -Wmultistatement-macros -Wsequence-point -Wswitch-default -Wswitch-enum -Wunused-value -Wstrict-overflow=2 -Warith-conversion -Wfloat-conversion -Wduplicated-cond -Wunsafe-loop-optimizations -Wreturn-type -Wunused-parameter -Wmaybe-uninitialized -Wstrict-aliasing -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wsuggest-attribute=malloc -Wmissing-format-attribute -Wmissing-noreturn -Walloc-zero -Walloca -Wtrampolines -Wcast-function-type -Wlogical-op -Wpacked -Wredundant-decls -Wunused -Wmismatched-dealloc -Wmismatched-new-delete -Wfree-nonheap-object -Wexceptions -MMD -fimplicit-templates For linking: /usr/local/bin/g++ -std=c++0x -O3 -DNDEBUG -DUSE_INTL=1 -DUSE_MUTEX=1 -D_FORTIFY_SOURCE=1 -pedantic-errors -Werror -fno-common -Wall -Wold-style-cast -Wsign-promo -Wpointer-arith -Wundef -Wwrite-strings -Winvalid-pch -Woverloaded-virtual -Wcast-qual -Wextra -Wredundant-decls -Wshadow -Wcast-align=strict -Wcomment -fstrict-aliasing -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wlogical-op -Wconversion -Wsign-conversion -Wmissing-declarations -Wdeprecated -ftree-switch-conversion -Wuninitialized -Wparentheses -Wimplicit-fallthrough=5 -Wformat-nonliteral -Wformat-truncation=2 -Wformat-signedness -Wdouble-promotion -Wformat=2 -Wformat-overflow=2 -Wformat-security -Wnull-dereference -Wmain -Wmultistatement-macros -Wsequence-point -Wswitch-default -Wswitch-enum -Wunused-value -Wstrict-overflow=2 -Warith-conversion -Wfloat-conversion -Wduplicated-cond -Wunsafe-loop-optimizations -Wreturn-type -Wunused-parameter -Wmaybe-uninitialized -Wstrict-aliasing -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wsuggest-attribute=malloc -Wmissing-format-attribute -Wmissing-noreturn -Walloc-zero -Walloca -Wtrampolines -Wcast-function-type -Wlogical-op -Wpacked -Wredundant-decls -Wunused -Wmismatched-dealloc -Wmismatched-new-delete -Wfree-nonheap-object -Wexceptions -Winline -MMD -fimplicit-templates -Wl,-warn-common -L.. -o header_edit.exe header_edit.o -lPatternDriver -lintl -lpthread Yes I know that most warnings have no effect at link time.