diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-01-26 11:55:37 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-01-26 16:47:47 +0100 |
commit | 0712d7feca6f35bc9936004a5c3408214a9acdef (patch) | |
tree | e1611954cc450605e73883b35008907364e2d851 /m4/ax_compiler_flags.m4 | |
parent | db885c0bc63b8c36754f5e7d567620dc04b0479a (diff) | |
download | autoconf-archive-0712d7feca6f35bc9936004a5c3408214a9acdef.tar.gz |
ax_compiler_flags: Document approach for locally disabling warnings
Instead of using ‘-Wno-*’ to disable a warning which the compiler is
erroneously emitting, use #pragmas to disable it for a specific source
code line.
Diffstat (limited to 'm4/ax_compiler_flags.m4')
-rw-r--r-- | m4/ax_compiler_flags.m4 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/m4/ax_compiler_flags.m4 b/m4/ax_compiler_flags.m4 index 154da2e..d75de2b 100644 --- a/m4/ax_compiler_flags.m4 +++ b/m4/ax_compiler_flags.m4 @@ -40,7 +40,11 @@ # EXTRA-*-CFLAGS and EXTRA-*-LDFLAGS variables. Flags should not be # disabled using these arguments, as the entire point of AX_COMPILER_FLAGS # is to enforce a consistent set of useful compiler warnings on code, -# using warnings which have been chosen for low false positive rates. +# using warnings which have been chosen for low false positive rates. If a +# compiler emits false positives for a warning, a #pragma should be used in +# the code to disable the warning locally. See: +# +# https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas # # IS-RELEASE can be used to disable -Werror when making a release, which # is useful for those hairy moments when you just want to get the release |