summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 13:19:40 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-08 13:19:40 +0000
commit26d1c5fff7f1a1e7c6430d667eb0ad19b329b5e0 (patch)
treecdc25a73277e939285d67c67cd208d1cd34a0bc2 /gcc/calls.c
parentc384605c898eb1534d21789b541a9f091a60070e (diff)
downloadgcc-26d1c5fff7f1a1e7c6430d667eb0ad19b329b5e0.tar.gz
PR c/14411
* calls.c (flags_from_decl_or_type): Handle eturns_twice' attribute. * c-common.c (handle_returns_twice): New function. (c_common_attribute_table): Declare eturns_twice' attribute. * doc/extend.texi: Document eturns_twice' attribute. * tree.h (DECL_IS_RETURNS_TWICE): New macro. (struct tree_decl): Add returns_twice_flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96101 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index f90e1a56ec4..d6032fc78bc 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -585,6 +585,10 @@ flags_from_decl_or_type (tree exp)
if (DECL_IS_MALLOC (exp))
flags |= ECF_MALLOC;
+ /* The function exp may have the `returns_twice' attribute. */
+ if (DECL_IS_RETURNS_TWICE (exp))
+ flags |= ECF_RETURNS_TWICE;
+
/* The function exp may have the `pure' attribute. */
if (DECL_IS_PURE (exp))
flags |= ECF_PURE | ECF_LIBCALL_BLOCK;