summaryrefslogtreecommitdiff
path: root/tests/semantics.at
diff options
context:
space:
mode:
authorNoah Misch <noah@cs.caltech.edu>2018-11-24 20:57:43 -0800
committerNoah Misch <noah@cs.caltech.edu>2018-11-24 20:57:43 -0800
commit92851e84f76f9cf67e0f299cb20380da74b7dca7 (patch)
tree6aa8d8d2db63d43efc206a2e90a0d9223b6647c2 /tests/semantics.at
parent487d6aaaa4fe45001d30c439ea6240fc74f1b5d7 (diff)
downloadautoconf-92851e84f76f9cf67e0f299cb20380da74b7dca7.tar.gz
AC_CHECK_DECL: when cached, don't overwrite a werror flag
* lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Restore werror flags inside the AC_CACHE_CHECK that saves them. Commit 82ef7805faffa151e724aa76c245ec590d174580 broke this. From Tom Lane (trivial change). * tests/semantics.at (AC_CHECK_DECLS): Test this.
Diffstat (limited to 'tests/semantics.at')
-rw-r--r--tests/semantics.at4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/semantics.at b/tests/semantics.at
index ec44af3a..49b89234 100644
--- a/tests/semantics.at
+++ b/tests/semantics.at
@@ -139,7 +139,11 @@ AT_CHECK_MACRO([AC_CHECK_DECLS],
extern char *declared (const char *);
#endif
]])
+ AC_LANG_WERROR
AC_CHECK_DECL([undeclared (char *)], [AS_EXIT([1])],, [[]])
+ if test -z "$ac_c_werror_flag"; then
+ AC_MSG_ERROR([ac_c_werror_flag overwritten])
+ fi
]],
[AT_CHECK_DEFINES(
[#define HAVE_DECL_BASENAM 1