diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 08:25:57 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 08:25:57 +0000 |
commit | 6ca10ffb30e14afa429439f2f5a9ea16a86da78c (patch) | |
tree | b0fb28af03940cf45907b0a26718969f02397496 /include | |
parent | 8523463bd857d31e4ca8dd9fe1fbef4710a86bae (diff) | |
download | gcc-6ca10ffb30e14afa429439f2f5a9ea16a86da78c.tar.gz |
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* ansidecl.h (ATTRIBUTE_PURE): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/ansidecl.h | 9 |
2 files changed, 13 insertions, 0 deletions
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 <bonzini@gnu.org> + + * ansidecl.h (ATTRIBUTE_PURE): New. + 2004-07-13 Bernardo Innocenti <bernie@develer.com> * 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' |