summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-17 21:27:37 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-17 21:27:37 +0000
commitf2f6bdab86a67e723520b8e831c287af9243a9ba (patch)
tree04d97fa13059a1054b2c7ec7fbb770b3edcc84fb /gcc/c-decl.c
parent057705e9ad0c4a565d9e1c7d74f72debf0c9af07 (diff)
downloadgcc-f2f6bdab86a67e723520b8e831c287af9243a9ba.tar.gz
2003-04-17 Roger Sayle <roger@eyesopen.com>
PR c/10375 * c-decl.c (duplicate_decls): Preserve "const" and "noreturn" function attributes. * cp/decl.c (duplicate_decls): Preserve "const", "noreturn" and "nothrow" function attributes. * f/com.c (duplicate_decls): Preserve "const" and "noreturn" function attributes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65753 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 0614476c00e..c852bd7789b 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1377,6 +1377,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
DECL_NO_LIMIT_STACK (newdecl) |= DECL_NO_LIMIT_STACK (olddecl);
DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (newdecl)
|= DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (olddecl);
+ TREE_THIS_VOLATILE (newdecl) |= TREE_THIS_VOLATILE (olddecl);
+ TREE_READONLY (newdecl) |= TREE_READONLY (olddecl);
DECL_IS_MALLOC (newdecl) |= DECL_IS_MALLOC (olddecl);
DECL_IS_PURE (newdecl) |= DECL_IS_PURE (olddecl);
}