summaryrefslogtreecommitdiff
path: root/include/ansidecl.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-11-30 23:56:52 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-11-30 23:56:52 +0000
commitd94656872ddd8c58776576c370d6e174ab6662f4 (patch)
tree23e9f73303003aee49a00d65cffac4129fa21658 /include/ansidecl.h
parent8251469698a59e0e3ea61ff9ced016544135048a (diff)
downloadgcc-d94656872ddd8c58776576c370d6e174ab6662f4.tar.gz
ansidecl.h (ATTRIBUTE_MALLOC): New macro.
* 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. From-SVN: r30732
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)