gcc-strict 662 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # Based on scripts by Thomas Dickey here: https://invisible-island.net/scripts/#compiler_wrappers
  3. # "originally from Fergus Henderson - fjh@munta.cs.mu.oz.au"
  4. #This was in gcc-normal
  5. OPTS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion"
  6. #And from gcc-strict
  7. OPTS="$OPTS -Og -W \
  8. -Wbad-function-cast \
  9. -Wcast-align \
  10. -Wcast-qual \
  11. -Wmissing-declarations \
  12. -Wnested-externs \
  13. -Wpointer-arith \
  14. -Wwrite-strings \
  15. -ansi \
  16. -pedantic"
  17. #And adapted from gcc-stricter
  18. OPTS="$OPTS -Wformat=2 -fstack-protector-strong"
  19. #And even more
  20. OPTS="$OPTS -Wold-style-definition -Wredundant-decls -Wjump-misses-init -Wlogical-op"
  21. gcc $OPTS "$@"