summaryrefslogtreecommitdiff
path: root/tests/warn-on-use.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:58 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:58 +0200
commit630f99f29bd31a76d8d24da2975a045452c763ef (patch)
tree0c801f68561bfb0930a4ade80d7ca3a7940887ab /tests/warn-on-use.h
parent84e26c587987e8484d55db4165f188b40c09e94b (diff)
parent4682deeb62247d34de87f8e777f99e2d337fd377 (diff)
Update upstream source from tag 'upstream/1.3'
Update to upstream version '1.3' with Debian dir 8a8e4828ddf646ece6c109b401e08d162be35936
Diffstat (limited to 'tests/warn-on-use.h')
-rw-r--r--tests/warn-on-use.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/warn-on-use.h b/tests/warn-on-use.h
index 701013a0..73c43971 100644
--- a/tests/warn-on-use.h
+++ b/tests/warn-on-use.h
@@ -85,7 +85,7 @@
*/
#ifndef _GL_WARN_ON_USE
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message)))
@@ -98,7 +98,7 @@ _GL_WARN_EXTERN_C __typeof__ (function) function \
__attribute__ ((__diagnose_if__ (1, message, "warning")))
# define _GL_WARN_ON_USE_ATTRIBUTE(message) \
__attribute__ ((__diagnose_if__ (1, message, "warning")))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE(function, message) \
_GL_WARN_EXTERN_C __typeof__ (function) function
@@ -121,7 +121,7 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
_GL_WARN_ON_USE (function, msg)
# else
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+# if (4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)) && !defined __clang__
/* A compiler attribute is available in gcc versions 4.3.0 and later. */
# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
extern rettype_gcc function parameters_and_attributes \
@@ -131,7 +131,7 @@ extern rettype_gcc function parameters_and_attributes \
# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
extern rettype_clang function parameters_and_attributes \
__attribute__ ((__diagnose_if__ (1, msg, "warning")))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# elif (__GNUC__ >= 3 || defined __clang__) && GNULIB_STRICT_CHECKING
/* Verify the existence of the function. */
# define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
extern rettype_gcc function parameters_and_attributes