summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-04-11 19:21:20 +0200
committerBruno Haible <bruno@clisp.org>2010-04-11 19:21:20 +0200
commitc4816327785a6cc48463453c72f2362b8de63269 (patch)
tree88b6cd33a761a7e2147fbd4cc72642fb2fced3f9 /build-aux
parentf8d79a1c80cfdeecb03eb1675c3cabf7d3a165c5 (diff)
downloadgnulib-c4816327785a6cc48463453c72f2362b8de63269.tar.gz
Stricter declaration checking in testdirs.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/warn-on-use.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h
index 37b6d2986a..d418ad6f62 100644
--- a/build-aux/warn-on-use.h
+++ b/build-aux/warn-on-use.h
@@ -67,7 +67,10 @@
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
-
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function. */
+# define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function
# else /* Unsupported. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C int _gl_warn_on_use
@@ -85,6 +88,10 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
extern rettype function parameters_and_attributes \
__attribute__ ((__warning__ (msg)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function. */
+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes
# else /* Unsupported. */
# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
_GL_WARN_EXTERN_C int _gl_warn_on_use