set(FUD_WARNINGS # baseline -Werror -Wall -Wextra # -pedantic -Wno-error=pedantic # -pedantic-errors -Wstack-usage=2048 # GCC specific -Wvla # variable modified types don't play nice in C++ # types -Wlong-long -Wlong-long -Winline # memory / data / array / string -Wsizeof-pointer-memaccess -Wpacked -Wuninitialized -Wstack-protector -Warray-bounds -Woverlength-strings -Wwrite-strings -Wcast-align -Wchar-subscripts -Wpointer-arith -Wstrict-aliasing -Wstrict-aliasing=2 -Wstrict-null-sentinel # classes / initialization -Weffc++ -Wmismatched-tags -Wmissing-field-initializers -Winit-self -Wctor-dtor-privacy -Wnon-virtual-dtor -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override # format -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wmissing-format-attribute -Wformat-overflow -Wformat-security -Wformat-signedness # floats and signedness -Wfloat-equal -Wsign-compare -Wsign-conversion -Wdouble-promotion # semantics / style -Wshadow -Wnull-dereference -Wimplicit-fallthrough=5 -Wduplicated-branches -Wduplicated-cond -Wcast-qual -Wcomment -Wconversion -Wmissing-braces -Winvalid-pch -Wmissing-include-dirs -Wparentheses -Wredundant-decls -Wreturn-type -Wsequence-point -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wswitch -Wswitch-default -Wswitch-enum # this plays badly with clangd # -Wzero-as-null-pointer-constant -Wlogical-op -Wuseless-cast -Wextra-semi -Wredundant-decls -Wmisleading-indentation # optmizations -Wdisabled-optimization -Wmissing-noreturn -Wvariadic-macros -Wvolatile-register-var -Wunreachable-code )