From 4fb5a791b08f4817cca93564d435e6624b4edb74 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Tue, 4 Jun 2019 21:16:03 -0400 Subject: [PATCH] [core] __attribute_pure__ --- src/first.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/first.h b/src/first.h index caa19c14..5dc1ad03 100644 --- a/src/first.h +++ b/src/first.h @@ -129,5 +129,14 @@ #endif #endif +#ifndef __attribute_pure__ +#if __has_attribute(pure) \ + || __GNUC_PREREQ(2,96) +#define __attribute_pure__(x) __attribute__((__pure__ x)) +#else +#define __attribute_pure__(x) +#endif +#endif + #endif