diff options
author | Noah Misch <noah@cs.caltech.edu> | 2015-05-13 21:11:47 -0400 |
---|---|---|
committer | Noah Misch <noah@cs.caltech.edu> | 2015-05-13 21:11:47 -0400 |
commit | 82ef7805faffa151e724aa76c245ec590d174580 (patch) | |
tree | 9b1b38555e5517f3d29a75a5e97eec43fbbc0c5b /doc/autoconf.texi | |
parent | d2f0ec870814233f21d9f3404ef60b8c65b47cad (diff) | |
download | autoconf-82ef7805faffa151e724aa76c245ec590d174580.tar.gz |
AC_CHECK_DECL, AC_CHECK_DECLS: port to the Clang compiler
* lib/autoconf/general.m4 (_AC_UNDECLARED_WARNING): New macro.
(_AC_CHECK_DECL_BODY): Call it once per language; treat warnings as
errors when its verdict indicates that.
* tests/semantics.at (AC_CHECK_DECLS): Add a macro call that relies on
the new semantics. Avoid -Wmissing-variable-declarations warnings.
* doc/autoconf.texi (Generic Declarations): Document the implications.
* NEWS: Mention this change.
Diffstat (limited to 'doc/autoconf.texi')
-rw-r--r-- | doc/autoconf.texi | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/autoconf.texi b/doc/autoconf.texi index b2ca0ae5..8c4302d3 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6315,6 +6315,12 @@ parentheses for types which can be zero-initialized: AC_CHECK_DECL([basename(char *)]) @end example +Some compilers don't indicate every missing declaration by the error +status. This macro checks the standard error from such compilers and +considers a declaration missing if any warnings have been reported. For +most compilers, though, warnings do not affect this macro's outcome +unless @code{AC_LANG_WERROR} is also specified. + This macro caches its result in the @code{ac_cv_have_decl_@var{symbol}} variable, with characters not suitable for a variable name mapped to underscores. @@ -6375,6 +6381,12 @@ You fall into the second category only in extreme situations: either your files may be used without being configured, or they are used during the configuration. In most cases the traditional approach is enough. +Some compilers don't indicate every missing declaration by the error +status. This macro checks the standard error from such compilers and +considers a declaration missing if any warnings have been reported. For +most compilers, though, warnings do not affect this macro's outcome +unless @code{AC_LANG_WERROR} is also specified. + This macro caches its results in @code{ac_cv_have_decl_@var{symbol}} variables, with characters not suitable for a variable name mapped to underscores. |