add WHEE global alias for C++ flags

This commit is contained in:
Connor Olding 2021-12-02 13:06:05 -08:00
parent de2d15c869
commit 803a77d27b
2 changed files with 25 additions and 0 deletions

View File

@ -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

View File

@ -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
)