From: Paolo Bonzini Date: Wed, 21 Jul 2004 08:25:57 +0000 (+0000) Subject: ansidecl.h (ATTRIBUTE_PURE): New. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b997cc8bb5bc3c83b9bf3e7866e0f4627f4b708;p=gcc.git ansidecl.h (ATTRIBUTE_PURE): New. 2004-07-21 Paolo Bonzini * ansidecl.h (ATTRIBUTE_PURE): New. From-SVN: r85001 --- diff --git a/include/ChangeLog b/include/ChangeLog index 0a736f82c52..8f714da9547 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2004-07-21 Paolo Bonzini + + * ansidecl.h (ATTRIBUTE_PURE): New. + 2004-07-13 Bernardo Innocenti * libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from diff --git a/include/ansidecl.h b/include/ansidecl.h index d2c87768ce2..4b3eae9d887 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -277,6 +277,15 @@ So instead we use the macro below and test it against specific values. */ # endif /* GNUC >= 3.3 */ #endif /* ATTRIBUTE_NONNULL */ +/* Attribute `pure' was valid as of gcc 3.0. */ +#ifndef ATTRIBUTE_PURE +# if (GCC_VERSION >= 3000) +# define ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define ATTRIBUTE_PURE +# endif /* GNUC >= 3.0 */ +#endif /* ATTRIBUTE_PURE */ + /* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL. This was the case for the `printf' format attribute by itself before GCC 3.3, but as of 3.3 we need to add the `nonnull'