From 69d87bf7d0a976a3c6ab8b9760cfc5c8a5f30bf3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 20 Jun 2008 10:41:27 +0300 Subject: [PATCH] Added ATTR_PURE macro, which expands to pure attribute if available. --HG-- branch : HEAD --- src/lib/macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/macros.h b/src/lib/macros.h index d3765ba5bd..055ce7573d 100644 --- a/src/lib/macros.h +++ b/src/lib/macros.h @@ -106,6 +106,7 @@ # define ATTR_UNUSED __attribute__((unused)) # define ATTR_NORETURN __attribute__((noreturn)) # define ATTR_CONST __attribute__((const)) +# define ATTR_PURE __attribute__((pure)) #else # define ATTR_FORMAT(format_idx, arg_idx) # define ATTR_FORMAT_ARG(arg_idx) @@ -113,7 +114,7 @@ # define ATTR_UNUSED # define ATTR_NORETURN # define ATTR_CONST -# define ATTR_UNUSED +# define ATTR_PURE #endif #if __GNUC__ > 2 # define ATTR_MALLOC __attribute__((malloc)) -- 2.47.3