[core] __attribute_pure__

This commit is contained in:
Glenn Strauss 2019-06-04 21:16:03 -04:00
parent 32a8f0b3b5
commit 4fb5a791b0
1 changed files with 9 additions and 0 deletions

View File

@ -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