David A. Wheeler wrote: > AC_PROG_CC_WARNINGS([low]) # off, low, medium, high; default medium > and in gcc "medium" might map to "-Wall". I'm afraid in practice things are not quite that simple. The set of warning flags that are useful varies from project; it's not a simple dial that one can turn from 1 to 10. For example, GCC does something like the following, if you configure --with-gcc-warnings: * Enable all GCC warning flags that the current compiler (whatever it is) supports. * But disable -Wtautological-constant-out-of-range-compare, -Wpointer-sign, -Wformat-extra-args, -Wunused-command-line-argument, -Wunused-value if using clang. * And disable -Wwrite-strings if using the Lucid or Motif toolkits (since those old interfaces generate too many warnings otherwise). And disable -Werror while you're at it (ditto). * Disable the following warnings on all platforms: -Wsystem-headers, -Woverlength-strings, -Wlogical-op, -Wformat-nonliteral, -Wvla, -Wnested-externs, -Wswitch-default, -Winline, -Wjump-misses-init, -Wstrict-overflow, -Wsync-nand, -Wunsafe-loop-optimizations, -Wbad-function-cast, -Wshadow, -Wstack-protector, -Wsuggest-attribute=pure, -Wmissing-field-initializers, -Wsign-compare, -Wtype-limits, -Wunused-parameter. * And if compiling the gnulib part of Emacs, disable -Wunused-macros as well. * Compile with _FORTIFY_SOURCE = 2 if optimizing, as this enables some further compile-time warnings. * Disable -pie, as -pie breaks Emacs's funky way of saving its state. The set of warnings options that other tools use is neither a superset nor a subset of the options that Emacs uses; there are simply too many knobs to turn. If you're interested in pursuing this, I suggest that you look at the configure.ac for Emacs, grep, coreutils, diffutils, and tar, and look for some of the variations. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf