diff options
author | Haru <haru@dotalux.com> | 2016-02-20 15:59:58 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-20 15:59:58 +0100 |
commit | 71968e6985a2d6798505b84bc7ed22f5c6bfcfac (patch) | |
tree | 4740ae636d410980f379cc4bb3a969b49451c7c7 /configure.in | |
parent | 5b74faa8afd04771af7acb918072ea71a3db475f (diff) | |
parent | b7f772294594c40ef1e18f9c044e5c4fe6b490f4 (diff) | |
download | hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.gz hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.bz2 hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.tar.xz hercules-71968e6985a2d6798505b84bc7ed22f5c6bfcfac.zip |
Merge pull request #1162 from 4144/flags
Add some compiler warning flags and fix new warnings
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.in b/configure.in index c8bc3a864..4729c095e 100644 --- a/configure.in +++ b/configure.in @@ -456,6 +456,24 @@ AC_PATH_PROG(AR, ar) AC_LANG([C]) +# -Wcast-qual use for check wrong casts. It cant be added by default, because some casts must be wrong. +# -Wconversion warning: conversion to 'long unsigned int' from 'int' may change the sign of the result +# -Wfloat-equal comparing floating point with == or != is unsafe +# -Wunsuffixed-float-constants float issues +# -Wpedantic different pedantic checks. Not all can be fixed in nice way. +# -Wtraditional-conversion some conversion issues +# -Wunsafe-loop-optimizations possible optimisation issues +# -Wunused-parameter -Wunused-but-set-parameter unused parameters +# -Wunused-macros unused macro warnings, but it also enable unused parameters +# -Wstrict-prototypes show warning in grammar.y +# attributes suggestion +# -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=pure + +# flags what can be used but now return no warnings: +# -Wchkp -Wdisabled-optimization +# -Werror-implicit-function-declaration -Wtrampolines +# -Wjump-misses-init + CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare" CPPFLAGS="$CPPFLAGS -I../common" LDFLAGS="$LDFLAGS" @@ -794,11 +812,26 @@ AC_CHECK_COMPILER_WNOFLAG(clobbered) AC_CHECK_COMPILER_WFLAG(empty-body) AC_CHECK_COMPILER_WFLAG(newline-eof) AC_CHECK_COMPILER_WFLAG(int-conversion) +AC_CHECK_COMPILER_WFLAG(init-self) +AC_CHECK_COMPILER_WFLAG(pointer-arith) +AC_CHECK_COMPILER_WFLAG(switch-bool) AC_CHECK_COMPILER_WFLAG(enum-conversion) AC_CHECK_COMPILER_WFLAG(shorten-64-to-32) AC_CHECK_COMPILER_WFLAG(constant-conversion) AC_CHECK_COMPILER_WFLAG(bool-conversion) AC_CHECK_COMPILER_WFLAG(format-security) +AC_CHECK_COMPILER_WFLAG(format) +AC_CHECK_COMPILER_WFLAG(format-signedness) +AC_CHECK_COMPILER_WFLAG(format-y2k) +AC_CHECK_COMPILER_WFLAG(missing-include-dirs) +AC_CHECK_COMPILER_WFLAG(suggest-attribute=noreturn) +AC_CHECK_COMPILER_WFLAG(undef) +AC_CHECK_COMPILER_WFLAG(cast-align) +AC_CHECK_COMPILER_WFLAG(logical-op) +AC_CHECK_COMPILER_WFLAG(nested-externs) +AC_CHECK_COMPILER_WFLAG(old-style-definition) +AC_CHECK_COMPILER_WFLAG(overlength-strings) +AC_CHECK_COMPILER_WFLAG(redundant-decls) AC_CHECK_COMPILER_WNOFLAG(format-nonliteral) AC_CHECK_COMPILER_WNOFLAG(switch) AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers) |