add flags for gcc and g++

advices from https://nullprogram.com/blog/2023/04/29/
This commit is contained in:
Mylloon 2023-04-30 16:42:01 +02:00
parent b7103dd121
commit 3b41592d6c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -16,8 +16,8 @@ abbr diff "delta"
abbr gc "git clone"
abbr grep "grep -Irni 'txt' ."
abbr ls "exa --git --icons -gl"
abbr mgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && ./a.out; rm a.out 2> /dev/null"
abbr mg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null"
abbr mgcc "clear; gcc -Wall -Wextra -Wconversion -Wdouble-promotion -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -fsanitize-trap -g3 main.c && ./a.out; rm a.out 2> /dev/null"
abbr mg++ "clear; g++ -Wall -Wextra -Wdouble-promotion -Wshadow -Wnon-virtual-dtor -pedantic -g3 -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null"
abbr mirrors_update "curl -s 'https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on' | sed -e 's/^#Server/Server/' -e '/^#/d' | sudo bash -c 'rankmirrors -n 7 - > /etc/pacman.d/mirrorlist' && sudo pacman -Syy"
abbr mmake "clear; make && ./main; make clean 2> /dev/null"
abbr nano "micro"