diff --git a/home/zshrc b/home/zshrc index 1c4f45b..b01aa20 100644 --- a/home/zshrc +++ b/home/zshrc @@ -200,6 +200,7 @@ fi alias -g OMFG="1>/dev/null" ### @ OMFG - silence stdout. alias -g STFU="2>/dev/null" ### @ STFU - silence stderr. alias -g WHOA='${whoa[@]}' ### @ WHOA - expand to several C/C++ flags to ease development. +alias -g WHEE='${whee[@]}' ### @ WHEE - WHOA but for C++ (specifically g++) only. alias -g WELP='${welp[@]}' ### @ WELP - expand to C++ flags to enable a C++-as-C facade. alias sc="~/sh/sc" # only runs in bash (for now), so be explicit with path diff --git a/sh/arrays b/sh/arrays index 53adb18..3c486e1 100644 --- a/sh/arrays +++ b/sh/arrays @@ -53,3 +53,27 @@ welp=( -ffunction-sections -fdata-sections -Wl,--gc-sections -finline-small-functions -findirect-inlining ) + +whee=( + -Wall + -Wextra + -Wwrite-strings + -Werror=uninitialized + -Werror=format-security + -Werror=format-extra-args + -Werror=int-to-pointer-cast + -Werror=return-type + -Werror=memset-transposed-args + -Wno-unused + -Wno-padded + -Wno-missing-field-initializers + -Wno-misleading-indentation + -Wduplicated-cond + -Wduplicated-branches + -Wlogical-op + -Wrestrict + -Wnull-dereference + -Wdouble-promotion + -Wformat=2 + -Werror=double-promotion +)