diff options
author | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-29 13:15:48 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-11-08 11:11:41 -0700 |
commit | 689a1abf0dba1f5353039a5625411c6c41098d3a (patch) | |
tree | 7db0e482d2f7aae06bb419948d1f2f2f7ff15d8d /include/ansidecl.h | |
parent | eec6550343414e9ebf12885533609c1ba9b397f1 (diff) | |
download | gdb-689a1abf0dba1f5353039a5625411c6c41098d3a.zip gdb-689a1abf0dba1f5353039a5625411c6c41098d3a.tar.gz gdb-689a1abf0dba1f5353039a5625411c6c41098d3a.tar.bz2 |
2013-10-29 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/58689
include/
* ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
* libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
(concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
Mark with attribute returns_nonnull.
libiberty/
* concat.c: Remove note about xmalloc.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r-- | include/ansidecl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h index 40f4a5f..5cd03a7 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -311,6 +311,15 @@ So instead we use the macro below and test it against specific values. */ # endif /* GNUC >= 3.3 */ #endif /* ATTRIBUTE_NONNULL */ +/* Attribute `returns_nonnull' was valid as of gcc 4.9. */ +#ifndef ATTRIBUTE_RETURNS_NONNULL +# if (GCC_VERSION >= 4009) +# define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__)) +# else +# define ATTRIBUTE_RETURNS_NONNULL +# endif /* GNUC >= 4.9 */ +#endif /* ATTRIBUTE_RETURNS_NONNULL */ + /* Attribute `pure' was valid as of gcc 3.0. */ #ifndef ATTRIBUTE_PURE # if (GCC_VERSION >= 3000) |