aboutsummaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-06-26 20:29:26 +0200
committerMattias Andrée <maandree@kth.se>2021-06-26 20:29:26 +0200
commitadb3ff3258884fec6d3718792d960bf63e5624f9 (patch)
tree10011e7f8ad8d445dbcabd73b5045655e30214dc /gcc
parentAdd touch-all alias (diff)
downloaddotfiles-adb3ff3258884fec6d3718792d960bf63e5624f9.tar.gz
dotfiles-adb3ff3258884fec6d3718792d960bf63e5624f9.tar.bz2
dotfiles-adb3ff3258884fec6d3718792d960bf63e5624f9.tar.xz
Add gcc-{,less-}extreme{,-not-pedantic}
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/Makefile9
-rwxr-xr-xgcc/gcc-extreme28
-rwxr-xr-xgcc/gcc-extreme-not-pedantic28
-rwxr-xr-xgcc/gcc-less-extreme29
-rwxr-xr-xgcc/gcc-less-extreme-not-pedantic29
5 files changed, 123 insertions, 0 deletions
diff --git a/gcc/Makefile b/gcc/Makefile
index 2bd3e49..f114403 100644
--- a/gcc/Makefile
+++ b/gcc/Makefile
@@ -5,9 +5,18 @@ install:
mkdir -p -- ~/.config/profile.d
test ! -d ~/.config/profile.d/gcc
ln -sf -- ~/.dotfiles/gcc/user-profile ~/.config/profile.d/gcc
+ mkdir -p -- ~/.local/bin
+ ln -sf -- ~/.dotfiles/gcc/gcc-extreme ~/.local/bin/
+ ln -sf -- ~/.dotfiles/gcc/gcc-extreme-not-pedantic ~/.local/bin/
+ ln -sf -- ~/.dotfiles/gcc/gcc-less-extreme ~/.local/bin/
+ ln -sf -- ~/.dotfiles/gcc/gcc-less-extreme-not-pedantic ~/.local/bin/
uninstall:
-unlink -- ~/.config/profile.d/gcc
-rmdir -- ~/.config/profile.d
+ -unlink -- ~/.local/bin/
+ -unlink -- ~/.local/bin/
+ -unlink -- ~/.local/bin/
+ -unlink -- ~/.local/bin/
.PHONY: install uninstall
diff --git a/gcc/gcc-extreme b/gcc/gcc-extreme
new file mode 100755
index 0000000..880f10b
--- /dev/null
+++ b/gcc/gcc-extreme
@@ -0,0 +1,28 @@
+#!/bin/sh
+exec gcc \
+ -fdiagnostics-color=auto \
+ \
+ -pedantic -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wtrampolines \
+ -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs \
+ -Winline -Wno-variadic-macros -Wduplicated-cond -Wexpansion-to-defined -Wmissing-field-initializers \
+ -Wdangling-else -Wswitch-bool -Wswitch-enum -Wswitch-unreachable -Wmissing-declarations -Wpointer-arith \
+ -Wpointer-compare -Wunused -Wunused-local-typedefs -Wunused-macros -Walloc-zero -Wsizeof-array-argument \
+ -Woverlength-strings -Winvalid-memory-model -Wunused-but-set-variable -Wcoverage-mismatch \
+ -Woverride-init-side-effects -Wshift-count-negative -Wshift-count-overflow -Wodr -Whsa -Wnull-dereference \
+ -Wdate-time -Winvalid-pch -Wignored-attributes -Wincompatible-pointer-types -Wjump-misses-init \
+ -Wformat-security -Wformat-signedness -Wformat-nonliteral -Wformat-y2k -Wframe-address -Wfloat-equal \
+ -Wdisabled-optimization -Wstringop-overflow=4 -Wformat-overflow=2 -Wformat-truncation=2 -Wshift-overflow=2 \
+ -Wstrict-aliasing=3 -Warray-bounds=2 -Wshadow=global \
+ \
+ -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow -Wdeclaration-after-statement \
+ -Wundef -Wbad-function-cast -Wcast-qual -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes \
+ -Wold-style-definition -Wpacked -Wvector-operation-performance -Wunsuffixed-float-constants \
+ -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-attribute=format \
+ -Wnormalized=nfkc -Wconversion \
+ \
+ -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage -funsafe-loop-optimizations \
+ \
+ "$@"
+
+# C++: -Weffc++ -Wc++11-compat -Wzero-as-null-pointer-constant -Wuseless-cast
+# Ignored: -Wswitch-default -Wc++-compat -Wpadded -Wtraditional -Wtraditional-conversion -Walloca
diff --git a/gcc/gcc-extreme-not-pedantic b/gcc/gcc-extreme-not-pedantic
new file mode 100755
index 0000000..bb1eebd
--- /dev/null
+++ b/gcc/gcc-extreme-not-pedantic
@@ -0,0 +1,28 @@
+#!/bin/sh
+exec gcc \
+ -fdiagnostics-color=auto \
+ \
+ -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wtrampolines \
+ -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs \
+ -Winline -Wno-variadic-macros -Wduplicated-cond -Wexpansion-to-defined -Wmissing-field-initializers \
+ -Wdangling-else -Wswitch-bool -Wswitch-enum -Wswitch-unreachable -Wmissing-declarations -Wpointer-arith \
+ -Wpointer-compare -Wunused -Wunused-local-typedefs -Wunused-macros -Walloc-zero -Wsizeof-array-argument \
+ -Woverlength-strings -Winvalid-memory-model -Wunused-but-set-variable -Wcoverage-mismatch \
+ -Woverride-init-side-effects -Wshift-count-negative -Wshift-count-overflow -Wodr -Whsa -Wnull-dereference \
+ -Wdate-time -Winvalid-pch -Wignored-attributes -Wincompatible-pointer-types -Wjump-misses-init \
+ -Wformat-security -Wformat-signedness -Wformat-nonliteral -Wformat-y2k -Wframe-address -Wfloat-equal \
+ -Wdisabled-optimization -Wstringop-overflow=4 -Wformat-overflow=2 -Wformat-truncation=2 -Wshift-overflow=2 \
+ -Wstrict-aliasing=3 -Warray-bounds=2 -Wshadow=global \
+ \
+ -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow -Wdeclaration-after-statement \
+ -Wundef -Wbad-function-cast -Wcast-qual -Wwrite-strings -Wlogical-op -Waggregate-return -Wstrict-prototypes \
+ -Wold-style-definition -Wpacked -Wvector-operation-performance -Wunsuffixed-float-constants \
+ -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-attribute=format \
+ -Wnormalized=nfkc -Wconversion \
+ \
+ -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage -funsafe-loop-optimizations \
+ \
+ "$@"
+
+# C++: -Weffc++ -Wc++11-compat -Wzero-as-null-pointer-constant -Wuseless-cast
+# Ignored: -Wswitch-default -Wc++-compat -Wpadded -Wtraditional -Wtraditional-conversion -Walloca
diff --git a/gcc/gcc-less-extreme b/gcc/gcc-less-extreme
new file mode 100755
index 0000000..3dabf25
--- /dev/null
+++ b/gcc/gcc-less-extreme
@@ -0,0 +1,29 @@
+#!/bin/sh
+exec gcc \
+ -fdiagnostics-color=auto \
+ \
+ -pedantic -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wtrampolines \
+ -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs \
+ -Winline -Wno-variadic-macros -Wduplicated-cond -Wexpansion-to-defined -Wmissing-field-initializers \
+ -Wdangling-else -Wswitch-bool -Wswitch-enum -Wswitch-unreachable -Wmissing-declarations -Wpointer-arith \
+ -Wpointer-compare -Wunused -Wunused-local-typedefs -Wunused-macros -Walloc-zero -Wsizeof-array-argument \
+ -Woverlength-strings -Winvalid-memory-model -Wunused-but-set-variable -Wcoverage-mismatch \
+ -Woverride-init-side-effects -Wshift-count-negative -Wshift-count-overflow -Wodr -Whsa -Wnull-dereference \
+ -Wdate-time -Winvalid-pch -Wignored-attributes -Wincompatible-pointer-types -Wjump-misses-init \
+ -Wformat-security -Wformat-signedness -Wformat-nonliteral -Wformat-y2k -Wframe-address -Wfloat-equal \
+ -Wdisabled-optimization -Wstringop-overflow=4 -Wformat-overflow=2 -Wformat-truncation=2 -Wshift-overflow=2 \
+ -Wstrict-aliasing=3 -Warray-bounds=2 -Wshadow=global \
+ \
+ -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow -Wdeclaration-after-statement \
+ -Wold-style-definition -Wpacked -Wvector-operation-performance -Wunsuffixed-float-constants \
+ -Wundef -Wbad-function-cast -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wnormalized=nfkc \
+ -Wcast-qual \
+ \
+ -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage -funsafe-loop-optimizations \
+ \
+ "$@"
+
+# C++: -Weffc++ -Wc++11-compat -Wzero-as-null-pointer-constant -Wuseless-cast
+# Ignored: -Wswitch-default -Wc++-compat -Wpadded -Wtraditional -Wtraditional-conversion -Walloca
+# -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure
+# -Wsuggest-attribute=format -Wconversion -Wwrite-strings
diff --git a/gcc/gcc-less-extreme-not-pedantic b/gcc/gcc-less-extreme-not-pedantic
new file mode 100755
index 0000000..fc10f90
--- /dev/null
+++ b/gcc/gcc-less-extreme-not-pedantic
@@ -0,0 +1,29 @@
+#!/bin/sh
+exec gcc \
+ -fdiagnostics-color=auto \
+ \
+ -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wtrampolines \
+ -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs \
+ -Winline -Wno-variadic-macros -Wduplicated-cond -Wexpansion-to-defined -Wmissing-field-initializers \
+ -Wdangling-else -Wswitch-bool -Wswitch-enum -Wswitch-unreachable -Wmissing-declarations -Wpointer-arith \
+ -Wpointer-compare -Wunused -Wunused-local-typedefs -Wunused-macros -Walloc-zero -Wsizeof-array-argument \
+ -Woverlength-strings -Winvalid-memory-model -Wunused-but-set-variable -Wcoverage-mismatch \
+ -Woverride-init-side-effects -Wshift-count-negative -Wshift-count-overflow -Wodr -Whsa -Wnull-dereference \
+ -Wdate-time -Winvalid-pch -Wignored-attributes -Wincompatible-pointer-types -Wjump-misses-init \
+ -Wformat-security -Wformat-signedness -Wformat-nonliteral -Wformat-y2k -Wframe-address -Wfloat-equal \
+ -Wdisabled-optimization -Wstringop-overflow=4 -Wformat-overflow=2 -Wformat-truncation=2 -Wshift-overflow=2 \
+ -Wstrict-aliasing=3 -Warray-bounds=2 -Wshadow=global \
+ \
+ -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow -Wdeclaration-after-statement \
+ -Wold-style-definition -Wpacked -Wvector-operation-performance -Wunsuffixed-float-constants \
+ -Wundef -Wbad-function-cast -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wnormalized=nfkc \
+ -Wcast-qual \
+ \
+ -fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage -funsafe-loop-optimizations \
+ \
+ "$@"
+
+# C++: -Weffc++ -Wc++11-compat -Wzero-as-null-pointer-constant -Wuseless-cast
+# Ignored: -Wswitch-default -Wc++-compat -Wpadded -Wtraditional -Wtraditional-conversion -Walloca
+# -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure
+# -Wsuggest-attribute=format -Wconversion -Wwrite-strings