From 4682deeb62247d34de87f8e777f99e2d337fd377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 20 Oct 2024 15:21:43 +0200 Subject: New upstream version 1.3 --- lib/warn-on-use.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/warn-on-use.h') diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h index 701013a0..73c43971 100644 --- a/lib/warn-on-use.h +++ b/lib/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 -- cgit v1.2.3