Skip to content

Instantly share code, notes, and snippets.

@fearofcode
Created August 2, 2018 07:19
Show Gist options
  • Select an option

  • Save fearofcode/dc994b2c357692a51f42974babccf8ce to your computer and use it in GitHub Desktop.

Select an option

Save fearofcode/dc994b2c357692a51f42974babccf8ce to your computer and use it in GitHub Desktop.
# http://stackoverflow.com/a/1667114
# https://kristerw.blogspot.com/2017/09/useful-gcc-warning-options-not-enabled.html
# various other places
CFLAGS = -Wall -Wextra -Wshadow -Werror -Wfatal-errors -pedantic -std=gnu11 -m64 \
-Wno-missing-braces -Wno-missing-field-initializers -Wformat=2 \
-Wswitch-default -Wswitch-enum -Wcast-align -Wpointer-arith \
-Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline \
-Wundef -Wnested-externs -Wcast-qual -Wshadow -Wunreachable-code \
-Wlogical-op -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \
-Wold-style-definition -Wduplicated-cond -Wduplicated-branches -Wrestrict \
-Wjump-misses-init -Wdouble-promotion -Wmisleading-indentation -O3
@fearofcode
Copy link
Author

also https://stackoverflow.com/a/3376483 for explanation of some of these

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment