From fd4332dbcd5227fde96e7bc128418d834b5b910f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 20 Sep 2023 18:05:27 +0200 Subject: Add tests for compile-time errors --- include/fortify-headers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/fortify-headers.h') diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 3eaed7c..bc7bf00 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -106,9 +106,9 @@ #define __diagnose_as_builtin(...) #endif -#if __has_attribute (__diagnose_if) -#define __warning_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "warning"))) -#define __error_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "error"))) +#if __has_attribute (diagnose_if) +#define __warning_if(cond, msg) __attribute__ ((diagnose_if (cond, msg, "warning"))) +#define __error_if(cond, msg) __attribute__ ((diagnose_if (cond, msg, "error"))) #else #define __warning_if(cond, msg) #define __error_if(cond, msg) -- cgit v1.3