aboutsummaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-30 23:56:52 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-30 23:56:52 +0000
commita481083c3a879488aa1b07d17439e2e690474e83 (patch)
tree23e9f73303003aee49a00d65cffac4129fa21658 /include/ansidecl.h
parentbdba5682c5ed34241f7098af259f57e7fe836d4d (diff)
* ansidecl.h (ATTRIBUTE_MALLOC): New macro.
* libiberty.h (buildargv, dupargv, concat, choose_temp_base, make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add ATTRIBUTE_MALLOC. (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30732 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/ansidecl.h')
-rw-r--r--include/ansidecl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 2b5c0e7f549..9e8a457c2e0 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -187,6 +187,15 @@ So instead we use the macro below and test it against specific values. */
# define __attribute__(x)
#endif
+/* Attribute __malloc__ on functions was valid as of gcc 2.96. */
+#ifndef ATTRIBUTE_MALLOC
+# if (GCC_VERSION >= 2096)
+# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define ATTRIBUTE_MALLOC
+# endif /* GNUC >= 2.96 */
+#endif /* ATTRIBUTE_MALLOC */
+
/* Attributes on labels were valid as of gcc 2.93. */
#ifndef ATTRIBUTE_UNUSED_LABEL
# if (GCC_VERSION >= 2093)